In "Sheet 1" I have data in columns A thru E.
Based on Column E result ... If Column E = "Y", then I need to copy those rows, columns A thru D only, to "Sheet 2" starting in row 15
Appreciate any help.
In "Sheet 1" I have data in columns A thru E.
Based on Column E result ... If Column E = "Y", then I need to copy those rows, columns A thru D only, to "Sheet 2" starting in row 15
Appreciate any help.
You will need VBA for this - I shall move the thread for you.
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
Forum Rules (updated August 2023): please read them here.
Needing to copy rows of data (columns A,B,C,D) from one spreadsheet to another based on criteria in column E
Here is what I have so far.
This pulls in all data from columns A:E, I just need A:D & it's not pulling in all the rows.
Sub CopyY()
Dim c As Range
Dim j As Integer
Dim Source As Worksheet
Dim Target As Worksheet
' Change worksheet designations as needed
Set Source = ActiveWorkbook.Worksheets("Sheet 1")
Set Target = ActiveWorkbook.Worksheets("Sheet 2")
j = 15 ' Start copying to row 1 in target sheet
For Each c In Source.Range("E1:E1000") ' Do 1000 rows
If c = "Y" Then
Source.Rows(c.Row).Copy Target.Rows(j)
j = 15
End If
Next c
End Sub
Last edited by RSa; 11-12-2019 at 10:19 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks