Hi All,
In an excel sheet after I select the empty cell I need to select from the next cell to it and start reading
A B C
1 2 3
empty 3 4
2 4 5
If I put in the code below it goes fine but it goes to the empty cell then starts back again from B2
Public Sub proIterate()
InitialRow = 2
Range("A" & Rows.Count).End(xlUp).Offset(1).Select
Sheets("GAMMING").Select
Range("B" & InitialRow).Select
'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"
'Write a loop that goes the number of times that u get from the previous function...
For RowCounter = 2 To FinalRow ' The loop you wanted
Call proNewMacro
If RowCounter = FinalRow Then
MsgBox ("The End")
End
End If
Sheets("GAMMING").Range("B" & InitialRow).Select
InitialRow = InitialRow + 1
Next
End Sub
When I try to do below
Public Sub proIterate()
InitialRow = Range("A" & Rows.Count).End(xlUp).Offset(1).Select
below line gets an error
Range("B" & InitialRow).Select
If anyone can help that would be great after I find the empty cell read should start from " empty 3 4" line
In an excel sheet after I select the empty cell I need to select from the next cell to it and start reading
A B C
1 2 3
empty 3 4
2 4 5
If I put in the code below it goes fine but it goes to the empty cell then starts back again from B2
Public Sub proIterate()
InitialRow = 2
Range("A" & Rows.Count).End(xlUp).Offset(1).Select
Sheets("GAMMING").Select
Range("B" & InitialRow).Select
'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"
'Write a loop that goes the number of times that u get from the previous function...
For RowCounter = 2 To FinalRow ' The loop you wanted
Call proNewMacro
If RowCounter = FinalRow Then
MsgBox ("The End")
End
End If
Sheets("GAMMING").Range("B" & InitialRow).Select
InitialRow = InitialRow + 1
Next
End Sub
When I try to do below
Public Sub proIterate()
InitialRow = Range("A" & Rows.Count).End(xlUp).Offset(1).Select
below line gets an error
Range("B" & InitialRow).Select
If anyone can help that would be great after I find the empty cell read should start from " empty 3 4" line