ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Use of "Formula" prt2 (https://www.excelbanter.com/excel-programming/335721-use-formula-prt2.html)

Ernesto[_3_]

Use of "Formula" prt2
 
hello all...i found this code and would like to know the following:

ActiveCell.Formula = "=" & ActiveCell.Offset(0, -1).Address & " / " & _
ActiveCell.Offset(-1, -1).Address

is there anyway to make one of the cells in the formula relative and
not absolute?

the result of this formula is (ie) "=$A$1/$B$1" and i'd like it to be
something like "=A$1 / $B$1"

Thanks!


Bob Phillips[_6_]

Use of "Formula" prt2
 
ActiveCell.Formula = "=" & ActiveCell.Offset(0, -1).Address(,False) & " / "
& _
ActiveCell.Offset(-1, -1).Address(,False)

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Ernesto" wrote in message
ups.com...
hello all...i found this code and would like to know the following:

ActiveCell.Formula = "=" & ActiveCell.Offset(0, -1).Address & " / " & _
ActiveCell.Offset(-1, -1).Address

is there anyway to make one of the cells in the formula relative and
not absolute?

the result of this formula is (ie) "=$A$1/$B$1" and i'd like it to be
something like "=A$1 / $B$1"

Thanks!




Ernesto[_3_]

Use of "Formula" prt2
 
perfect!

thanks!



All times are GMT +1. The time now is 12:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com