Data transfer as per my condition

AKGOEL

New Member
Joined
Jun 12, 2015
Messages
2
I HAVE THE DATA IN THE FOLLOWING FORMAT ON SHEET1
S.N0NAMEPASSPORT YES/NO
1AKYES
2BKYES
3CKNO
4DKYES
5EKNO
6FKYES
7GKNO
8HKYES
9IKNO
10JKYES
12KKNO
13LKYES
14MKYES

<tbody>
</tbody>
RESULT REQUIRED IN SHEET 2
S.NONAMEPASSPORT YES/NO
1AK
YES
2BKYES
3DKYES
4FKYES
5HKYES
6JKYES
7LKYES
8MKYES

<tbody>
</tbody>

I WANT TO TRANSFER MY DATA FROM SHEET 1 TO SHEET 2 ,THOSE NAMES WHOSE AGAINST WRITTEN YES IN THIRD COLOUMN
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Welcome to the forum,

Use a Filter on the Passport Yes/No to Yes then copy the data and paste over to sheet 2.
 
Upvote 0
You would need to use the worksheet code so use the right mouse button on the tab name and select View Code then at the top click first drop down on the left and select Worksheet then on the right drop down select Change then you can use this code. You may have to adjust the Column letter, and also this is for new data not current data. So you might need to do the filter first as previous mentioned to get the current list on to sheet 2.

Private Sub Worksheet_Change(ByVal Target As Range)
Dim B As Range
If Intersect(Target, Me.Range("c:c")) Is Nothing Then Exit Sub
For Each B In Intersect(Target, Me.Range("c:c")).Cells
If B.Text = "Yes" Then
B.EntireRow.Copy Worksheets("Sheet2").Cells(Rows.Count, "A").End(xlUp).Offset(1).EntireRow
'C.EntireRow.Delete
End If
Next
End Sub
 
Upvote 0

Forum statistics

Threads
1,203,552
Messages
6,056,053
Members
444,841
Latest member
SF_Marnie

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