Forum Discussion
Assistance with a function applying to multiple worksheets
- HansVogelaarOct 01, 2022MVP
What you want is not possible using the CELL function:
- In the form =CELL("address") it will return the address of the active cell, on whichever sheet is the active sheet.
- In the form =CELL("address",A1) or =CELL("address",Timecard!A1) it will return A1 instead of the address of the active cell.
You might use VBA code to store the address of the last used cell on the Timecard sheet in a cell, but that has the undesirable side effect of disabling Undo on the Timecard sheet...
- StickyVESOct 01, 2022Copper ContributorI have a nasty habit of finding problematic issues like this. Thanks very much for the help!
- mathetesOct 01, 2022Gold Contributor
There may be another way, depending on how that Timecard worksheet is laid out, and whether or not the final cell is always in the same column. I have a couple of worksheets in which I find it convenient to know what the last row is.
I use a formula like this: =COUNTA($A$7:$A$10000)
I know column A has some text in it in every row until the last one, so the count gives me the row number. (For now, the fact that it's limited to 10,000 max gives plenty of margin, but that number is arbitrary.)
It would be fairly easy to construct a cell reference, knowing that piece of information, if you always are using the same column for your last entry in Timecard