I'm using the code below to loop through a range of cells, which is currently based on one column. It puts the value in from the loop into cell T1. I need to expand the loop so that columns P & Q are used, the values then need putting in cells T1 and U1.
I have tinkered around with the code but cannot get U1 to show the correct value.
As always any help would be appreciated.
Sub Cells_Loop()
Dim i As Range
Dim LastRowColP As Long
LastRowColP = Sheets("Menu").Range("P65536").End(xlUp).Row
For Each i In Sheets("Menu").Range("P8:P" & LastRowColP) 'or whatever your range is
Sheets("Menu").Range("T1").Value = i.Value
'Call Get_Data
Application.StatusBar = i
Next i
Application.StatusBar = False
End Sub
I have tinkered around with the code but cannot get U1 to show the correct value.
As always any help would be appreciated.
Sub Cells_Loop()
Dim i As Range
Dim LastRowColP As Long
LastRowColP = Sheets("Menu").Range("P65536").End(xlUp).Row
For Each i In Sheets("Menu").Range("P8:P" & LastRowColP) 'or whatever your range is
Sheets("Menu").Range("T1").Value = i.Value
'Call Get_Data
Application.StatusBar = i
Next i
Application.StatusBar = False
End Sub