telling Excel to go down relatively

C

CC

Using VBA, how do you tell Excel to go down to the next cell relatively, rather than absolutely?
 
F

Frank Kabel

Hi
not quite sure what you're trying to do. Maybe
activecell.offset(1,0).select
 
B

Bob Phillips

Activecell.Offset(1,0).Select

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

CC said:
Using VBA, how do you tell Excel to go down to the next cell relatively,
rather than absolutely?
 
J

Jake Marx

Hi CC,
Using VBA, how do you tell Excel to go down to the next cell
relatively, rather than absolutely?

ActiveCell.Offset(1, 0).Select

or

ActiveCell(2, 1).Select

However, it's rare that you need to select anything when working with Excel
through VBA. If you just need the value of the cell below the activecell,
you could do this:

MsgBox ActiveCell.Offset(1, 0).Value

or

MsgBox ActiveCell(2, 1).Value

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]
 
Top