Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to Find the Max ?
I need a macro to find a max value for range of cells and also the value of the cell adjacent to max cell.
i should input the range while running the macro. kindly help me in this ... Submitted via EggHeadCafe - Software Developer Portal of Choice EggheadCafe Stock Quote WebService http://www.eggheadcafe.com/tutorials...k-quote-w.aspx |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to Find the Max ?
You can use the worksheet function max and then search for the value 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) -- joel ------------------------------------------------------------------------ joel's Profile: 229 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=167026 Microsoft Office Help |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to Find the Max ?
=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 <Anandh R wrote in message ... I need a macro to find a max value for range of cells and also the value of the cell adjacent to max cell. i should input the range while running the macro. kindly help me in this ... Submitted via EggHeadCafe - Software Developer Portal of Choice EggheadCafe Stock Quote WebService http://www.eggheadcafe.com/tutorials...k-quote-w.aspx |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
macro that does a find and then find next | Excel Programming | |||
Find & Replace and Find & Insert macro help needed | Excel Programming | |||
Get Macro warning, but can't find Macro | Excel Worksheet Functions | |||
change error message when no more for "find" in macro to find | Excel Programming | |||
I need to find a macro to find data cut and paste to another colu. | Excel Programming |