IF function returns two different false responses

original.grace

New Member
Joined
Jun 29, 2011
Messages
12
Is there a way to have an embedded IF function that returns two different false responses?

For instance, I want both of these in the same formula:

=IF(ISTEXT(H2),"yes","no")
=IF(ISTEXT(E2),"yes","not seq")
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
A single formula can only return one value, although that one value can contain more than one piece of information. For example a formula might return a value of "Fred & Wilma" which is a single value containing two pieces of information.

My first thought would be something like this:-
Code:
=[COLOR=blue][B]IF(ISTEXT(H2),"H2 yes","H2 no") [/B][/COLOR]& "," & [COLOR=magenta][B]IF(ISTEXT(E2),"E2 yes","E2 not seq")[/B][/COLOR]

If that's not what you want, you'll need to tell us what you want returned for each possible combination of values of E2 and H2. I'm assuming the TEXT property is the criterion, so what do you want the formula to return in each of these cases:-

- E2 and H2 are both text
- E2 is text, H2 is not
- E2 is not text, H2 is
- neither E2 nor H2 is text
 
Last edited:
Upvote 0
Try

=IF(ISTEXT(H2),IF(ISTEXT(E2),"yes","not seq"),"no")

This returns "yes" if BOTH are text, "not seq" if E2 is not text, "no" if H2 is not text.
 
Upvote 0
Is there a way to have an embedded IF function that returns two different false responses?

For instance, I want both of these in the same formula:

=IF(ISTEXT(H2),"yes","no")
=IF(ISTEXT(E2),"yes","not seq")

=if(AND(ISTEXT(H2),ISTEXT(E2)),"Yes",IF(ISTEXT(H2)=FALSE,"No",IF(ISTEXT(E2)=FALSE,"Not Seq","Error")))))

Popped the error in there but shouldn't make a difference works in my test
:biggrin:
 
Upvote 0
Should be: =IF(ISTEXT(E2),IF(ISTEXT(H2),"yes","no"),"notseq")
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,609
Messages
6,179,874
Members
452,949
Latest member
Dupuhini

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