Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc,microsoft.public.excel.worksheet.functions,microsoft.public.excel.newusers
|
|||
|
|||
![]()
Thank you Harlan & Jim (once again!)
I don't know if superfoo2 is perfect, but it is a heck of a lot better than what I originally posted. -- Gary's Student "Jim Cone" wrote: This seems to work... Function superfoo2(r As Range) As String Dim m As Double m = Application.Max(r) superfoo2 = r.Find(What:=m, after:=r(r.Count)).Address End Function ------ Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "Harlan Grove" wrote in message ups.com... Gary''s Student wrote... .... Function superfoo(r As Range) As String Dim s As String m = Application.Max(r) superfoo = r.Find(What:=m, After:=ActiveCell).Address End Function This throws a #VALUE! error. What am I doing wrong? .... Find is a *method* rather than a property of the Range class. You can't run methods from udfs because udfs can't do anything other than return values to the calling cell. The Find method tries to change ActiveCell, but udfs can't do that. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Finding Location of Maximum Value in 2D Array | Excel Discussion (Misc queries) | |||
How to know location of cell found with MIN/MAX? | Excel Discussion (Misc queries) | |||
finding cell location | Excel Discussion (Misc queries) | |||
Help creating a report from a data table | Excel Discussion (Misc queries) | |||
Question to Bob Phillips (or whoever...) | Excel Worksheet Functions |