I have a worksheet:
set 1:
ID Paste?
1 N
2 Y
I have a second worksheet:
set 2:
ID
0
1
If I want to automatically paste the entire row from sheet 1 to the bottom of sheet 2 conditional on Y, how would I do this?
I have a worksheet:
set 1:
ID Paste?
1 N
2 Y
I have a second worksheet:
set 2:
ID
0
1
If I want to automatically paste the entire row from sheet 1 to the bottom of sheet 2 conditional on Y, how would I do this?
.
Aren't you supposed to be in Russia ?
To answer your question ... if this is Sheet 1 :
A B 1 ID Paste? 2 1 N 3 2 Y 4
And this is Sheet 2 :
A B C D 1 ID 2 0 3 1 4 You want to paste Row 3 of Sheet1 in this row (Sheet2) ?
That is exactly what I'd like to doHowever, column B of sheet one would have the "Y" and "N" it wouldn't be concatenated in column A.
.
See if this does what you are seeking :
![]()
Option Explicit Sub cpypste() Dim i As Integer For i = Cells(Rows.Count, "B").End(xlUp).Row To 1 Step -1 If Sheets("Sheet1").Range("B" & i).Value = "Y" Then Sheets("Sheet1").Range("A" & i).Value = "-" Sheets("Sheet1").Rows(i).Copy Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Offset(1) End If Next i End Sub
Thanks so much :D
.
You are welcome.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks