Hi All,
I Am reading and excel sheet using macro. I have Put a condition already if the code come across ani ISNummeric = false Skip it to next line.
I wanna know if the code comes a line where Column A B and C is empty Code should end DO Not go Beyond that row. Below is the table as per table below
Code should end after line 3.
<tbody>
</tbody>
My Code is ..
Public Sub proIterate()
Dim RowCounter As Long
InitialRow = 2
'Write a procedure that counts the number of rows...
FinalRow = BaseSheet.Cells(BaseSheet.Rows.Count, "B").End(xlUp).Row 'This gives the number of data in the column "B"
For RowCounter = InitialRow To ThisWorkbook.Sheets("sheet1").Cells(ThisWorkbook.Sheets("sheet1").Rows.Count, "A").End(xlUp).Row ' The loop you wanted
If IsNumeric(ThisWorkbook.Sheets("sheet1").Cells(RowCounter, "A")) = True Then
'ThisWorkbook.Sheets("sheet1").Cells(RowCounter, "D") = "A" & RowCounter & " is a number"
Call proNewMacro
End If
InitialRow = InitialRow + 1
Next
MsgBox ("The End")
End Sub
Code Might need a bit of clean up Sorry about that.
Any Help would be great
I Am reading and excel sheet using macro. I have Put a condition already if the code come across ani ISNummeric = false Skip it to next line.
I wanna know if the code comes a line where Column A B and C is empty Code should end DO Not go Beyond that row. Below is the table as per table below
Code should end after line 3.
SEQ | acc | bsb |
1 | 123 | 4567 |
bas | 456 | 789 |
2 | 123 | 4567 |
3 | 147 | 78 |
4 | 474 | 456 |
5 | 741 | 475 |
<tbody>
</tbody>
My Code is ..
Public Sub proIterate()
Dim RowCounter As Long
InitialRow = 2
'Write a procedure that counts the number of rows...
FinalRow = BaseSheet.Cells(BaseSheet.Rows.Count, "B").End(xlUp).Row 'This gives the number of data in the column "B"
For RowCounter = InitialRow To ThisWorkbook.Sheets("sheet1").Cells(ThisWorkbook.Sheets("sheet1").Rows.Count, "A").End(xlUp).Row ' The loop you wanted
If IsNumeric(ThisWorkbook.Sheets("sheet1").Cells(RowCounter, "A")) = True Then
'ThisWorkbook.Sheets("sheet1").Cells(RowCounter, "D") = "A" & RowCounter & " is a number"
Call proNewMacro
End If
InitialRow = InitialRow + 1
Next
MsgBox ("The End")
End Sub
Code Might need a bit of clean up Sorry about that.
Any Help would be great