IF/MAX/MATCH formula required

colinheslop1984

Board Regular
Joined
Oct 14, 2016
Messages
129
Office Version
  1. 2016
ABCDEFGH
1week 1week 1week 2week 2week 3week 3
2WRWRWRWBRB
32510308301230FIND THIS NUMBER

I have a table of data that looks like above.
I have used MAX function to find the highest occurring number in cells labelled with "W".
In cell H3, I want to find the highest occurring number in columns titled "R", where "W" value = G3

I have used =IF(A3=G3,B3,IF(C3=G3,D5,IF(E3=G3,F3,)))

But where a "W" number repeats in the range, it just returns the first number in the table that matches the criteria of the formula (D3), rather than the highest one, which would be F3 in this case.

Can someone help write a formula that would fix this?

Thank you
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
It would be good to know what version of Excel you're running? You can put this into your signature.

This should work in any version:

H3: =MAX(IF((A3:E3=G3)*(A2:E2="W"),B3:F3)) control-shift-enter unless you have Excel 365.
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (rather than a signature) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
It would be good to know what version of Excel you're running? You can put this into your signature.

This should work in any version:

H3: =MAX(IF((A3:E3=G3)*(A2:E2="W"),B3:F3)) control-shift-enter unless you have Excel 365.
Thanks that worked perfectly!
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (rather than a signature) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
I will do that, thanks for the advice
 
Upvote 0

Forum statistics

Threads
1,224,813
Messages
6,181,107
Members
453,021
Latest member
Justyna P

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