I have the following macro with me which is letting me copy data till the next blank row.
PHP Code:
Public Sub CopyRows()
Sheets("Raw Data").Select
' Find the last row of data
FinalRow = Cells(Rows.Count, 1).End(xlUp).Row
' Loop through each row
For x = 2 To FinalRow
' Decide if to copy based on column H
ThisValue = Cells(x, 1).Value
If ThisValue <> 0 Then
Cells(x, 1).Resize(1, 33).Copy
Sheets("English").Select
NextRow = Cells(Rows.Count, 1).End(xlUp).Row + 1
Cells(NextRow, 1).Select
ActiveSheet.Paste
Sheets("Raw Data").Select
ElseIf ThisValue <> 0 Then
Cells(x, 1).Resize(1, 33).Copy
Sheets("Hindi").Select
NextRow = Cells(Rows.Count, 1).End(xlUp).Row + 1
Cells(NextRow, 1).Select
ActiveSheet.Paste
Sheets("Hindi").Select
End If
Next x
End Sub
But i need it like if it founds a blank row in the raw data sheet it should copy the data from the next blank row to another sheet.
I mean, it should start the validation and copy the data first to English sheet till A13. Next it found blank row. so again the data from A17 to A29 to be copied in Hindi and the next rows to be copied to English & Hindi.
Bookmarks