View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Looping Question?

Sub Tester1()
For Each rw In Range(Cells(5, 2), _
Cells(Rows.Count, 2).End(xlUp))
For Each cell In rw.Resize(1, 7)
Application.StatusBar = "Current Row No = " & rw.Row _
& " Current Cell = " & cell.Address(0, 0) & _
" Current Value = " & cell.Value
For i = 1 To 1000000
dblval = dblval + 1
Next
Next
Next
Application.StatusBar = False
End Sub


the loop For i = 1 to 1000000
represents the processing you would do on each cell. Right now, it just
slows the macro down, otherwise, it runs so fast you can't see the results.
So, you would replace that portion with the processing you are performing.

--
Regards,
Tom Ogilvy




"Michael168" wrote in message
...

How to loop through the range B:H from row 5 until the end?
I like to have the value show up in the message board like current row
no = 5 current cell = 5b current value = 8, somethings like this.

Hopefully I can get the answer for the above question.

Thanks.


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/