multiple variables in an IF statement

R0ckie

New Member
Joined
Apr 3, 2013
Messages
13
Trying to use IF in a spreadsheet formula to return a value based on 2 other values being met. Trouble is, the 2 values that have to be satisfied can be different. I.E., Value 1 can be constant and Value 2 could have multiple values. An additional Value 1 could have different multiple values. My formula (as follows) works thru the first set but then returns FALSE.

=(IF(A2="ftow",IF(B2="MOB2012","FTOW",IF(A2="Ftow",IF(B2="MOB2013","ftow",IF(A2="Ften",IF(B2="DAS ENET","FIBR",IF(A2="Ften",IF(B2="COW SPL EVT","FIBR",0)))))))))

Value 1Value 2Desired ReturnReturned value
FTOWMOB2013FTOWftow
FTOWMOB2012FTOWFTOW
FTENDAS ENETFIBRFALSE
FTENCOW SPL EVTFIBRFALSE

<COLGROUP> <COL style="WIDTH: 40pt; mso-width-source: userset; mso-width-alt: 1938" width=53><COL style="WIDTH: 66pt; mso-width-source: userset; mso-width-alt: 3218" width=88><COL style="WIDTH: 76pt; mso-width-source: userset; mso-width-alt: 3693" width=101><COL style="WIDTH: 57pt; mso-width-source: userset; mso-width-alt: 2779" width=76> <TBODY>
</TBODY>

<COLGROUP><COL style="WIDTH: 40pt; mso-width-source: userset; mso-width-alt: 1938" width=53><COL style="WIDTH: 66pt; mso-width-source: userset; mso-width-alt: 3218" width=88><COL style="WIDTH: 76pt; mso-width-source: userset; mso-width-alt: 3693" width=101><COL style="WIDTH: 57pt; mso-width-source: userset; mso-width-alt: 2779" width=76><TBODY>
</TBODY>
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Hi,

Try,

=IF(AND(A2="FTOW",OR(B2="MOB2013",B2="MOB2012")),"FTOW",IF(AND(A2="FTEN",OR(B2="DAS ENET",B2="COW SPL EVT")),"FIBR"))

Jai
 
Upvote 0

Forum statistics

Threads
1,213,529
Messages
6,114,155
Members
448,554
Latest member
Gleisner2

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