The table is
[TABLE="class: cms_table, width: 192"]
<tbody>[TR]
[TD="class: cms_table_xl65, width: 64"]SEQ[/TD]
[TD="width: 64"]acc[/TD]
[TD="width: 64"]bsb[/TD]
[/TR]
[TR]
[TD="class: cms_table_xl65, align: right"]1[/TD]
[TD="align: right"]123[/TD]
[TD="align: right"]4567[/TD]
[/TR]
[TR]
[TD="class: cms_table_xl65"]bas[/TD]
[TD="align: right"]456[/TD]
[TD="align: right"]789[/TD]
[/TR]
[TR]
[TD="class: cms_table_xl65, align: right"]2[/TD]
[TD="align: right"]123[/TD]
[TD="align: right"]4567[/TD]
[/TR]
[TR]
[TD="class: cms_table_xl65, align: right"]3[/TD]
[TD="align: right"]147[/TD]
[TD="align: right"]78999
[/TD]
[/TR]
</tbody>[/TABLE]
Below is the code
Private Sub CommandButton1_Click()
Dim InitialRow As Integer
InitialRow = 2
Set BaseSheet = ThisWorkbook.Sheets("sheet2")
FinalRow = BaseSheet.Cells(BaseSheet.Rows.Count, "A").End(xlUp).Row 'This gives the number of data in the column "B"
For RowCounter = 2 To FinalRow ' The loop you wanted
If RowCounter = FinalRow Then
MsgBox ("The End")
End
End If
If IsNumeric(Range("A2")) = True Then
Range("D2") = "A1 is a number"
Else
Range("D2") = "A1 is not number"
End If
Sheets("Sheet2").Range("A" & InitialRow).Select
InitialRow = InitialRow + 1
Next
End Sub
I have done a bit of changes to previous code just dont know why output is not changing in each row
[TABLE="class: cms_table, width: 192"]
<tbody>[TR]
[TD="class: cms_table_xl65, width: 64"]SEQ[/TD]
[TD="width: 64"]acc[/TD]
[TD="width: 64"]bsb[/TD]
[/TR]
[TR]
[TD="class: cms_table_xl65, align: right"]1[/TD]
[TD="align: right"]123[/TD]
[TD="align: right"]4567[/TD]
[/TR]
[TR]
[TD="class: cms_table_xl65"]bas[/TD]
[TD="align: right"]456[/TD]
[TD="align: right"]789[/TD]
[/TR]
[TR]
[TD="class: cms_table_xl65, align: right"]2[/TD]
[TD="align: right"]123[/TD]
[TD="align: right"]4567[/TD]
[/TR]
[TR]
[TD="class: cms_table_xl65, align: right"]3[/TD]
[TD="align: right"]147[/TD]
[TD="align: right"]78999
[/TD]
[/TR]
</tbody>[/TABLE]
Below is the code
Private Sub CommandButton1_Click()
Dim InitialRow As Integer
InitialRow = 2
Set BaseSheet = ThisWorkbook.Sheets("sheet2")
FinalRow = BaseSheet.Cells(BaseSheet.Rows.Count, "A").End(xlUp).Row 'This gives the number of data in the column "B"
For RowCounter = 2 To FinalRow ' The loop you wanted
If RowCounter = FinalRow Then
MsgBox ("The End")
End
End If
If IsNumeric(Range("A2")) = True Then
Range("D2") = "A1 is a number"
Else
Range("D2") = "A1 is not number"
End If
Sheets("Sheet2").Range("A" & InitialRow).Select
InitialRow = InitialRow + 1
Next
End Sub
I have done a bit of changes to previous code just dont know why output is not changing in each row