Sub copy_paste_data_from_one_sheet_to_another()
'Let's start at row 2. Row 1 has headers
x = 4
Dim myName As String
Dim myNameF As String
Dim cPart As Range
Dim Wk1 As Worksheet
Dim Wk2 As Worksheet
'Dim nextRow As Long
'Dim oCol As Long
'Dim myCopy As Range
'Dim myTest As Range
'Dim myTest1 As Range
'Set inputWks = Worksheets("Input")
'Set historyWks = Worksheets("KOLKATA")
Set Wk1 = Worksheets("booking")
Set Wk2 = Worksheets("Check List")
Wk2.Activate
'LastRow = Range("D65536").End(xlUp).Row + 1
Range("A5" & ":N65536").ClearContents
myNameF = Application.InputBox(" Enter : - B I L L N O ")
'myName = Application.Selection("Checklist")
myName = UCase(myNameF)
'Worksheets("wk1").Activate
'Start the loop
Do While Cells(x, 8) <> ""
'Look for name
If Cells(x, 8) = myName Then
'copy the row if it contains 'myName'
Wk1.Rows(x).Copy
'Go to sheet2. Activate it. We want the data here
Wk2.Activate
'Find the first empty row in sheet2
erow = Wk2.Cells(Rows.Count, 8).End(xlUp).Offset(1, 0).Row
'erow = Wk2.Cells(Rows.Count, 8).Offset(3, 0).Row
'Paste the data here
Application.DisplayAlerts = False
ActiveSheet.Paste Destination:=Wk2.Rows(erow)
Application.DisplayAlerts = True
End If
'go to sheet1 again and actvate it
Wk1.Activate
'Loop through the other rows with data
x = x + 1
Loop
Wk2.Activate
End Sub