MrExcel Publishing
Your One Stop for Excel Tips & Solutions

testing for current cell

Posted by Robert Yerby on August 13, 2001 10:40 AM

Can anybody tell me what the formulae is to return the current cell address. Basically I want a macro to perform a function in blank cells in a subtotaled data range. I am planning to use the END DOWN commands to find the blank cells and when the current cell is in row 65536 to stop. This of course may not be the best way, any suggestions gratefully received.

Posted by faster on August 13, 2001 10:55 AM

this may help

Sub Test()

Dim MyEnd
MyEnd = Cells.SpecialCells(xlCellTypeLastCell).Row + 1

'select start range
Do While Selection.Row < MyEnd
'do something
selection.offset(1,0).select 'or whatever

End Sub

Posted by faster on August 13, 2001 10:56 AM

To answer your question: