Thread
:
address of min or max result
View Single Post
#
7
Posted to microsoft.public.excel.programming
Gary Keramidas
external usenet poster
Posts: 2,494
address of min or max result
hi don:
i get an object variable or with block variable not set error when i run it.
--
Gary
"Don Guillett" wrote in message
...
you may like this better
maxaddress = Columns(1).find(Application.Max(Columns(1))).Addre ss
change to your range if desired
Sub findmax()
Set myrange = Range("c23:k23")'or rows(23)
mc = myrange.find(Application.Max(myrange)).Address
MsgBox mc
End Sub
--
Don Guillett
SalesAid Software
"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
thanks, both of you, ended up getting this from your help.
application.worksheetfunction.match(application.wo rksheetfunction.max(range("c23:k23")),range("c23:k 23"),0)
--
Gary
"Trevor Shuttleworth" wrote in message
...
Gary
=MATCH(MAX(A:A),A:A,0)
will return the row number of the maximum value in column A
=MATCH(MIN(A:A),A:A,0) for the minimum
Regards
Trevor
"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
is there an easy way to return the address of the min or max result? if
it's a lot of code, i'm not going to worry about it, it's not that
important. but if there's an easy way, i'd like to know.
thanks
--
Gary
Reply With Quote
Gary Keramidas
View Public Profile
Find all posts by Gary Keramidas