Nested IF formula =IF(M23<S23,S23,M23),IF(S23="",M23,S23) is NOT working

Tenywerre

New Member
Joined
Feb 1, 2024
Messages
1
Office Version
  1. 365
Platform
  1. Windows
My formula =IF(M23<S23,S23,M23) works great by it's self and formula IF(S23="",M23,S23) works great by it's self. When merge them I am getting a #VALUE! error and I don't know what I am missing or doing wrong. Any help is very much appreciated.

Thank you in advance.
 

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.
You can't string together two IF statements like that. What you show in your thread title is not a nested formula, it's just two IF functions joined by a comma.

I would rewrite your first formula to use MAX:
Excel Formula:
=MAX(M23,S23)

Here is my best guess as to what you want: If S23 is blank, the formula returns M23. (That's what your second formula does.) But if S23 is not blank, then it goes on to return the larger of M23 or S23.
Excel Formula:
=IF(S23="",M23,MAX(M23,S23))

If that is not what you need then please describe what you want the formula to do. Don't think in terms of merging your other two formulas, just describe what outcome you want.
 
Upvote 0
If you don't have negative numbers at all, the MAX formula 6String gave you might accomplish everything by itself.
If S23 is blank, it will evaluate as 0, and then it would return M23 because that value would be larger than zero (or zero itself)
 
Upvote 0

Forum statistics

Threads
1,215,350
Messages
6,124,439
Members
449,160
Latest member
nikijon

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