Using nested formula that contains (>,if blank, and xlookup)

janema

Board Regular
Joined
Nov 28, 2022
Messages
117
Office Version
  1. 365
  2. 2021
  3. 2019
  4. 2011
  5. 2010
Platform
  1. Windows
  2. Mobile
=IF(AV4="",AO4,IF(AO4>AV4,AO4,AV4))

The above formula is pulling data from column AV unless that field is blank to where it will pull the data from column AO. In some cases there is no data in column AV so in those cases, I want it to just pull from AO, but if there is data in both AO and AV, I am pulling the HIGHER value of the two. I need to add one more element that if AO happens to be blank, then it pulls AV. Not sure where to put that formula because it errors out on me.

Essentially, what I am trying to do is shown in the screen shot below. But I keep getting blanks on some or errors. There should be data in all fields using this logic, so I think I'm doing the formula wrong.

1677008402092.png
 

Attachments

  • 1677007302153.png
    1677007302153.png
    30.7 KB · Views: 4
  • 1677007375456.png
    1677007375456.png
    33.7 KB · Views: 4

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
How about
Excel Formula:
=MAX(AO4,AV4)
 
Upvote 0
Solution
How about
Excel Formula:
=MAX(AO4,AV4)

Oh my gosh, yes! I didn't even think of that and just made it overly complicated! LOL. I didn't realize it will pull the other if one is blank using this. THANK YOU SO MUCH!!!:love:
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,035
Messages
6,122,785
Members
449,095
Latest member
m_smith_solihull

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