I have text that will update my Excel spread sheet I never know how long the row will go because it is dependent on the date span.
How do I get the row to get a shaded quality to basically loop until there is no date or text in the cell?
Printable View
I have text that will update my Excel spread sheet I never know how long the row will go because it is dependent on the date span.
How do I get the row to get a shaded quality to basically loop until there is no date or text in the cell?
You can use either one of these method to grab the last row.
Code:'OVERALL: Count the number of records
'Method1
Dim intLastRow as Integer
intLastRow = ActiveCell.SpecialCells(xlLastCell).Row
'Method2
intLastRow = ActiveSheet.UsedRange.Rows.Count
After that just put it into a loop.
Code:Do
'Your Instructions
Loop Until activecell.row = intLastRow
thank you!!!