View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Getting Started - Referencing Cells

No, Offset is zero based.

If you had to use 0,0, then there is a miscommunication.

demo'd from the immediate window in the VBE:

? Range("A1").Offset(0,0).Address
$A$1
? Range("A1").Offset(1,0).Address
$A$2


--
Regards,
Tom Ogilvy


"Tatakau" wrote in message
...
That did it!

Though I had to use an offset of (0,0) to assign a value to a cell that

was
right below the current cell, instead of (1,0)... not sure why. Guess

it's
just the coding convention.

Thanks!

Nick

"Tom Ogilvy" wrote:

ActiveCell.offset(1,0).Value = 2 * x + 1

--
Regards,
Tom Ogilvy


"Tatakau" wrote in message
...
Hey,

I've been coding a bit in Access lately, so I know the basics of VB.

What
I
don't know is how to reference specific cells. I know that the

current
column is '.column', and the current row is '.row', and the value of

the
current cell is '.value'.

I am trying to assign a value to the cell right below the current

cell.
I'd
like to do something like this:

(.column, .row + 1).value = 2 * x + 1

Anyone know how to code this?

Thanks!

Nick