ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   OFFSET Syntax (https://www.excelbanter.com/excel-programming/305870-offset-syntax.html)

Scott1523[_2_]

OFFSET Syntax
 
I recorded a simple macro that places the subtotal formula in a selecte
cell. Is there a way to use OFFSET to force the formula to star
reading 2 lines below the selected cell and to the end of the colum
data?
Here is what I am currently using but it doesn't work correctly if th
selected cell is below the 2nd row.


Selection.FormulaR1C1 = "=SUBTOTAL(9,R[2]C:R[65535]C)"

Any help would be greatly appreciated.
thanks,
Scot

--
Message posted from http://www.ExcelForum.com


Frank Kabel

OFFSET Syntax
 
Hi Scott
not really sure what your issue is? Could you give an example of the
expected formula in a given cell location?

--
Regards
Frank Kabel
Frankfurt, Germany


I recorded a simple macro that places the subtotal formula in a
selected cell. Is there a way to use OFFSET to force the formula to
start reading 2 lines below the selected cell and to the end of the
column data?
Here is what I am currently using but it doesn't work correctly if

the
selected cell is below the 2nd row.


Selection.FormulaR1C1 = "=SUBTOTAL(9,R[2]C:R[65535]C)"

Any help would be greatly appreciated.
thanks,
Scott


---
Message posted from http://www.ExcelForum.com/



Scott1523[_3_]

OFFSET Syntax
 
If I place this formula in row 4, I will receive a circular referenc
error (because the current formula always begins reading from row 2).
I need a formula that is not based on a specific cell reference, bu
rather a relative position.
Hope this helps define my problem a little better.
Thanks again for all your help.
Scot

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 05:16 PM.

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