I
iashorty
When I am writing a formula in VBA how do I refer to a cell relatively rather
than an exact cell?
For example:
Range("B1").Select
Selection.End (xlDown)
ActiveCell.Offset(1, 7).Select
This puts me in cell in column "I" but the row is unknown to me. Now I want
to write a formula that adds the numbers in columns B-D and subtracts the
number in column J of the same line into column I. How do I reference cells
on the same row but in different columns when I do not know the row number?
And, can this be adjusted if I know the row number but the column is relative?
than an exact cell?
For example:
Range("B1").Select
Selection.End (xlDown)
ActiveCell.Offset(1, 7).Select
This puts me in cell in column "I" but the row is unknown to me. Now I want
to write a formula that adds the numbers in columns B-D and subtracts the
number in column J of the same line into column I. How do I reference cells
on the same row but in different columns when I do not know the row number?
And, can this be adjusted if I know the row number but the column is relative?