Data Copying

mariasrg

New Member
Joined
Jul 2, 2018
Messages
14
Hi

I have a spreadsheet that has multiple tabs - each tab has the same column headers. 2 columns show Risk and Priority where the values can be low, medium or high. If the value of these is High I would like to copy the whole row of data to a summary worksheet within the same spreadsheet - if that makes sense.

Thanks in advance
 
1583939106028.png
 
Upvote 0

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
If all the sheets (except Summary) look the same as the Management sheet, then I can't see why the macro should not work. If you could upload a copy of your file to a free site such as www.box.com. or www.dropbox.com I would be able to test the macro on your actual file. Once you do the upload, mark it for 'Sharing' and you will be given a link to the file that you can post here.
 
Upvote 0
Oh my you are amazing - couple of things - I put a high in management for both risk and priority and it puts it on the summary twice - could that be changed to just put it on once - also dont need it for maint & Capex. I know Im a pain
 
Upvote 0
Delete all the "High" values in columns E and F and then replace the previous macro with this one:
VBA Code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
    If Intersect(Target, Sh.Range("E:F")) Is Nothing Then Exit Sub
    Application.ScreenUpdating = False
    If Sh.Name <> "Summary" And Sh.Name <> "Weekly Governance Data" And Sh.Name <> "Maint & CAPEX" Then
        Select Case Target.Column
            Case Is = 5
                If Target = "High" And Target.Offset(, 1) = "" Then
                    Target.EntireRow.Copy Sheets("Summary").Cells(Sheets("Summary").Rows.Count, "A").End(xlUp).Offset(1)
                End If
            Case Is = 6
                If Target = "High" And Target.Offset(, -1) = "" Then
                    Target.EntireRow.Copy Sheets("Summary").Cells(Sheets("Summary").Rows.Count, "A").End(xlUp).Offset(1)
                End If
        End Select
    End If
    Application.ScreenUpdating = True
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,818
Members
449,049
Latest member
cybersurfer5000

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top