ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Absolute references (https://www.excelbanter.com/excel-programming/286579-absolute-references.html)

BWGames

Absolute references
 
Hi,

I have a formula which calculates the total sum of a range of cells.

I have it set to =SUM($D$5:D7), which works fine, but my macro inserts a
new row, creating a new row 5, which means my 'absolute' reference changes
to $D$6, which is not what I want, is there a way round this?

Thanks,

Ben
--
BWGames
to email change de.news to de-news

Harlan Grove

Absolute references
 
"BWGames" wrote...
....
I have it set to =SUM($D$5:D7), which works fine, but my macro inserts a
new row, creating a new row 5, which means my 'absolute' reference changes
to $D$6, which is not what I want, is there a way round this?

....

Try =SUM(INDIRECT("D5"):D7) .




All times are GMT +1. The time now is 09:04 AM.

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