Friday, July 17, 2009
Solve this email query - populating values based on max value
6 comments:
- Unknown, July 17, 2009 at 2:12 AM
-
Hello,
You may use this formula: "INDEX($J$19:$GZ$166,ROW()-18,MATCH(MAX($J$2:$DD$2),$J$2:$DD$2,0))" in cell G19 and then drag the formula till where you want the data to be copied. Now whenever the data in row 2 changes the data in column G will be populated with the data from the column where the highest value exists in row 2 (the data will be pulled from the range $J$19:$GZ$166).
Hope this solves Pedro's problem!!
Thanks,
hp - Unknown, July 17, 2009 at 7:58 PM
-
Insert the following formula into cell G19 and copy down:
INDEX($J$2:$DD$166,ROW(F19)-(ROW(G$2)-1),MATCH(MAX($J$2:$DD$2),$J$2:$DD$2,0))
This should still work even if more blank rows are inserted before row 2 or between rows 2 and 19.
Jason
--- - Anonymous, July 17, 2009 at 8:00 PM
-
Try this:
INDEX($J$2:$DD$166,ROW(F19)-(ROW(G$2)-1),MATCH(MAX($J$2:$DD$2),$J$2:$DD$2,0))
This will work even if more blank rows are inserted before row 2 and between rows 2 and 19.
Jason - Excel Matic, July 18, 2009 at 2:03 AM
-
@hp @Jason @Anonymous - guys great work! it works really great. The code has also taken care of inserting a new row between rows 2 and 9. Thanks guys.
@Jason @Anonymous - what a co-incidence!! You both guys submitted exactly the same code ;-) - Excel Matic, July 18, 2009 at 2:07 AM
-
Here is my code for the same query:
=INDIRECT(ADDRESS(ROW($I19),MATCH(MAX($K$2:$DE$2),$A$2:$DE$2,0)))
Hello,
ReplyDeleteYou may use this formula: "INDEX($J$19:$GZ$166,ROW()-18,MATCH(MAX($J$2:$DD$2),$J$2:$DD$2,0))" in cell G19 and then drag the formula till where you want the data to be copied. Now whenever the data in row 2 changes the data in column G will be populated with the data from the column where the highest value exists in row 2 (the data will be pulled from the range $J$19:$GZ$166).
Hope this solves Pedro's problem!!
Thanks,
hp
Insert the following formula into cell G19 and copy down:
ReplyDeleteINDEX($J$2:$DD$166,ROW(F19)-(ROW(G$2)-1),MATCH(MAX($J$2:$DD$2),$J$2:$DD$2,0))
This should still work even if more blank rows are inserted before row 2 or between rows 2 and 19.
Jason
---
Try this:
ReplyDeleteINDEX($J$2:$DD$166,ROW(F19)-(ROW(G$2)-1),MATCH(MAX($J$2:$DD$2),$J$2:$DD$2,0))
This will work even if more blank rows are inserted before row 2 and between rows 2 and 19.
Jason
@hp @Jason @Anonymous - guys great work! it works really great. The code has also taken care of inserting a new row between rows 2 and 9. Thanks guys.
ReplyDelete@Jason @Anonymous - what a co-incidence!! You both guys submitted exactly the same code ;-)
Here is my code for the same query:
ReplyDelete=INDIRECT(ADDRESS(ROW($I19),MATCH(MAX($K$2:$DE$2),$A$2:$DE$2,0)))
Guys Pretty Simple and good logic..
ReplyDeletePrakash