Macro to Find the Max ?

J

joel

You can use the worksheet function max and then search for the valu
using Find like this


Set MyRange = Range("a1:a100")
MaxVal = worksheetfunction.max(MyRange)
Set C = MyRange.find(what:=MaxVal,lookin:=xlvalues,lookat:=xlwhole)
AdjacentValue = C.offset(0,1
 
P

Peter T

=INDEX(B1:B100,MATCH(MAX(A1:A100),A1:A100,0),1)

where the range you want to search Max is A1:A100 and you want to return the
cell in B1:B100.

Regards,
Peter T
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top