Multiple IF logic Tests

F4TMAN

New Member
Joined
Jun 29, 2020
Messages
25
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Hello,

I'm trying to condense the long formula i currently have and was hoping for some guidance on the possibility or narrowing the formula

Here are the logical test

If Cell O1 ,P1 ,Q1 has value then takes Q1 value first. if only Q1 is blank & O1 and P1 has value then take P1 if only P1 blank & O1 and Q1 has value then take Q1 if only O1 blank & P1 and Q1 has value then take Q1 If any Two blank Take filled one value if all blank not take any value

Below is the current formula that i would like to shorten if possible

Excel Formula:
=IF(IF(AND($O2<>"",$P2<>"",$Q2<>""),$Q2,IF(AND($Q2="",$P2<>"",$O2<>""),$P2,IF(AND($P2="",$Q2<>"",$O2<>""),$Q2,IF(AND($O2="",$P2<>"",$Q2<>""),$Q2,IF(AND($O2="",$P2=""),$Q2,IF(AND($O2="",$Q2=""),$P2,IF(AND($P2="",$Q2=""),$O2,IF(AND($O2="",$P2="",$Q2=""),""))))))))=U$1,$T2,0)
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
So what you want is the right most filled cell of the three.

=IF(Q1<>"", Q1, IF(P1<>"", P1, O1&""))
 
Upvote 0

Forum statistics

Threads
1,215,050
Messages
6,122,868
Members
449,097
Latest member
dbomb1414

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