Excel Formula question from excel newb

svrem

New Member
Joined
May 27, 2011
Messages
6
SO I have decided to teach myself excel and thought I was getting along great creating spreadsheets until I ran into a little snag with what I thought would be a simple formula. I have been beating my head on this for a day now and figured I would ask for assistance. Below is an example of what I am trying to do:

-- removed inline image ---


I am trying to make a formula so that the corresponding product in Column A is returned to cell B10/11 (they are merged) when a match is found for D9 (D9 is already set to max(D2:D7)). I tried using some of the lookup functions but the data in columns B and C is dynamic in that it changes automatically from a web feed every hour so I cant have it in ascending order. Cell B10 should return Oranges in this example but if Apples was more profitable in 2 hours it should change to apples automatically.

Any help would be appreciated.
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Something like

=INDEX(A2:A7, MATCH(MAX(D2:D7), D2:D7, 0), 1)

should do what you want.

By the way, Merged Cells have evil consequences. For your situation, a horizontal alignment of CenterAcrossSelection would be a better approach.
 
Upvote 0
Wow that was fast, Mike your formula worked perfectly. Tried yours njimack and it told me there were to many arguments, but thank you for trying to assist anyways. Thank for the quick response. I should have come here after the 1st hour of struggling :D .
 
Upvote 0
Oops - it should have been =INDEX(A2:A7,MATCH(D9,D2:D7,0))

And I wholeheartedly second Mike's comment re Merged cells - the programmer who first dreamt them up is surely going to hell!
 
Upvote 0

Forum statistics

Threads
1,224,581
Messages
6,179,668
Members
452,936
Latest member
anamikabhargaw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top