View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] rumkus@hotmail.com is offline
external usenet poster
 
Posts: 22
Default Loop from left to the right

With Worksheets("sheetA")
Set rng = .Range("a2", .Range("a" & Rows.Count).End(xlUp))
For Each X In rng
'
Next X
End With

With above code i can loop through all rows of my data in column(A).
Say my data consists of unknown numbers of rows and columns and i want to loop from last cell of column(A) to the right most column which is unkown. I mean from left most to the right most column of last row with data.
How can i modify above code for that purpose ?
Thank you very much in advance.