Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Application.Caller returns a range (the range of the cell containing the
function) when called from a cell. So It is hard to imagine how you could be getting this error using the same code I provided in the same way I describe. -- Regards, Tom Ogilvy mark kubicki wrote in message ... gotcha... and that's where i get the error?? "Tom Ogilvy" wrote in message ... I put this in a general module Public Function MyFunc() Set rng = Application.Caller MyFunc = rng.Column End Function in the worksheet I put in =myfunc() and it returns the column of the cell containing the function which is then displayed in the cell. What are you doing? -- Regards, Tom Ogilvy mark kubicki wrote in message ... i keep getting the error: run-time 13, type mismatch?? "Tom Ogilvy" wrote in message ... If your formula is a User defined function, use application.Caller Public Function MyFunc() set rng = Application.Caller Myfunc = rng.column End Function as a trivial example. -- Regards, Tom Ogilvy mark kubicki wrote in message ... how do i get the column number of the cell that my formula is written in guess it's not: activecell.column |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
formula to display cell address | Excel Discussion (Misc queries) | |||
Formula for Cell address | Excel Worksheet Functions | |||
Formula without cell address | Excel Discussion (Misc queries) | |||
Cell Address in Formula | Excel Discussion (Misc queries) | |||
cell address from formula | Excel Discussion (Misc queries) |