Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Referencing "current" row (not using ActiveCell.Row)
This must be easy, but I'm being a bit stupid here as I can't find the
method that I'm after. I have a custom volatile function that I want to return the row in which the function is used - not the active row. (Actually, it does a lot more, but this is the crux of the problem.) So: Function GetRow() Application.Volatile (True) GetRow = Application.ActiveCell.Row End Function doesn't work because if I click away from the cell that uses the function, the cell then gets the value of the active cell and not the one in which the function is used. After much searching on MS and Google, I admit that I'm stumped. :-| Any ideas? TIA MArk |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Referencing "current" row (not using ActiveCell.Row)
Function CallerAddr()
Application.Volatile CallerAddr = Application.Caller.Address(external:=True) End Function Function CallerRow() Application.Volatile CallerRow = Application.Caller.Row 'This must be part of s'thing else '=ROW() would be lots more efficient End Function keepITcool < email : keepitcool chello nl (with @ and .) < homepage: http://members.chello.nl/keepitcool "Mark" wrote: This must be easy, but I'm being a bit stupid here as I can't find the method that I'm after. I have a custom volatile function that I want to return the row in which the function is used - not the active row. (Actually, it does a lot more, but this is the crux of the problem.) So: Function GetRow() Application.Volatile (True) GetRow = Application.ActiveCell.Row End Function doesn't work because if I click away from the cell that uses the function, the cell then gets the value of the active cell and not the one in which the function is used. After much searching on MS and Google, I admit that I'm stumped. :-| Any ideas? TIA MArk |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Referencing "current" row (not using ActiveCell.Row)
"keepITcool" wrote in message ... Function CallerAddr() Application.Volatile CallerAddr = Application.Caller.Address(external:=True) End Function Function CallerRow() Application.Volatile CallerRow = Application.Caller.Row 'This must be part of s'thing else '=ROW() would be lots more efficient End Function Perfect! Thanks very much. :-) Mark keepITcool < email : keepitcool chello nl (with @ and .) < homepage: http://members.chello.nl/keepitcool "Mark" wrote: This must be easy, but I'm being a bit stupid here as I can't find the method that I'm after. I have a custom volatile function that I want to return the row in which the function is used - not the active row. (Actually, it does a lot more, but this is the crux of the problem.) So: Function GetRow() Application.Volatile (True) GetRow = Application.ActiveCell.Row End Function doesn't work because if I click away from the cell that uses the function, the cell then gets the value of the active cell and not the one in which the function is used. After much searching on MS and Google, I admit that I'm stumped. :-| Any ideas? TIA MArk |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
ActiveCell.FormulaR1C1 = "=SUM(R[-tellerteller]C:R[-1]C)" | Excel Discussion (Misc queries) | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
Functions for "current" & "previous" month to calculate data | Excel Worksheet Functions | |||
=IF((TODAY()-B8)30, "Overdue", "Current"), | Excel Discussion (Misc queries) | |||
XP VBA: Range("A2", ActiveCell.SpecialCells(xlLastCell)).Select | Excel Programming |