View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Trevor Shuttleworth Trevor Shuttleworth is offline
external usenet poster
 
Posts: 1,089
Default address of min or max result

Thanks for the feedback.

The code gives the position within the data range. If you need the
"address" or the column you'll need to adjust the result.

Any likelihood that you'll have duplicate maximum or minimum values ? The
match will only return the first occurrence.

Regards

Trevor


"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