=ifs or =if(or(

Mel Smith

Well-known Member
Joined
Dec 13, 2005
Messages
1,023
Office Version
  1. 365
Platform
  1. Windows
Hello folks,

Could someone help me with this formula, please? I have two columns containing values (C4:C37) and (E4:E37). What I am trying (and failing) to achieve is in G4 (and I will copy it down to G37) is if the value in C4 or E4 is the Max value of C4:C37 OR E4:E37 then display that value, otherwise show nothing ("").

Many thanks.

Mel
 
In cells G4:G37 I'm trying to get the highest value from cells C4:C37 and/or cells E4:E37. In G4, for example, if the highest values from C4:C37 AND E4:E37 is not in either C4 or E4 then display "" and then have this copied down to G37. If, say the highest value in column C was 25 and the highest value in column E was 24 then the only value I want to display in G# will be 25 (the highest overall.

I hope this makes sense.

Mel
I think that's exactly what the formula is doing. If you are getting a result contrary to that, please post the data associated with that result using XL2BB.
 
Upvote 0

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Here's what my spreadsheet looks like:

1st XI dot ball strings.xlsm
CDEFG
411 
526 
629 
7412 
816216
944 
1055 
1166 
1277 
1388 
1499 
15 
16 
17 
18 
19 
20 
21 
22 
23 
241516
25 
26 
27 
281516
29 
301012 
31 
32 
33 
34 
35 
36 
371013 
First Class
Cell Formulas
RangeFormula
G4:G28G4=IF(OR(C4=MAX($C$4:$C$37),E4=MAX($E$4:$E$37)),MAX($C$4:$E$37),"")
G29:G37G29=IF(OR(C29=MAX($C$4:$C$37),E29=MAX($E$4:$E$37)),MAX($C$4:$C$37,$E$4:$E$37),"")
Named Ranges
NameRefers ToCells
Output_1='First Class'!$D$4:$D$37,'First Class'!$F$4:$F$37G4:G28
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E4:E37Other TypeColor scaleNO
C4:C37Other TypeColor scaleNO
Cells with Data Validation
CellAllowCriteria
D4:D37List=Squad
F4:F37List=Squad
 
Upvote 0
Looks like the formula is returning exactly what is intended. What's your concern?

If, say the highest value in column C was 25 and the highest value in column E was 24 then the only value I want to display in G# will be 25 (the highest overall.
 
Upvote 0
On line 24 and 28 the display in G24 and G28 should be "" because there is only one value of 16 (in cell C8) therefore all cells in column G should be blank except for G8.
 
Upvote 0
On line 24 and 28 the display in G24 and G28 should be "" because there is only one value of 16 (in cell C8) therefore all cells in column G should be blank except for G8.
Not so. Wherever the value of the col E cell matches the max value in col E cells, the max value in G4:E37 will be returned.

Perhaps this is what you want?
Book1
CDEFG
411 
526 
629 
7412 
816216
944 
1055 
1166 
1277 
1388 
1499 
15 
16 
17 
18 
19 
20 
21 
22 
23 
2415 
25 
26 
27 
2815 
29 
301012 
31 
32 
33 
34 
35 
36 
371013 
IQData
Cell Formulas
RangeFormula
G4:G37G4=IF(C4=MAX($C$4:$E$37),C4,IF(E4=MAX($C$4:$E$37),E4,""))
 
Upvote 0
Solution
Hi Joe,

That's just the job! Many thanks, as always.

Mel
 
Upvote 0

Forum statistics

Threads
1,214,652
Messages
6,120,747
Members
448,989
Latest member
mariah3

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