IF Function

Jimh64

New Member
Joined
Mar 22, 2010
Messages
21
I am sure this is easy for most of you, but I am struggling. I would like to put 2 IF Functions in one cell.

I started with this and it works fine:

=IF(A12="X",1,0)

I would just like to add that IF B12 has an X, then it would equal 1 as well. Either A12 or B12 will have an X, never both.

How can I add the second IF?

Thanks!



<colgroup><col style="mso-width-source:userset;mso-width-alt:1308;width:28pt" width="37"> <col style="mso-width-source:userset;mso-width-alt:1365;width:29pt" width="38"> <col style="width:48pt" span="7" width="64"> <col style="mso-width-source:userset;mso-width-alt:2673;width:56pt" width="75"> <col style="mso-width-source:userset;mso-width-alt:3811;width:80pt" width="107"> </colgroup><tbody>
[TD="class: xl79, width: 37"]NO[/TD]
[TD="class: xl79, width: 38"]YES[/TD]
[TD="class: xl77, width: 448, colspan: 7"]INSPECTION[/TD]
[TD="class: xl77, width: 75"]POINT VALUE[/TD]
[TD="class: xl77, width: 107"]POINTS ACHIEVED[/TD]

[TD="class: xl65"] [/TD]
[TD="class: xl70"]X[/TD]
[TD="class: xl81, width: 448, colspan: 7"]All outside lighting 100% operational[/TD]
[TD="class: xl65"]1[/TD]
[TD="class: xl65"]1[/TD]

[TD="class: xl66"] [/TD]
[TD="class: xl69"]X[/TD]
[TD="class: xl72, width: 448, colspan: 7"]Parking lot and surrounding area of store free of debris[/TD]
[TD="class: xl66"]1[/TD]
[TD="class: xl66"]1[/TD]

[TD="class: xl66"] [/TD]
[TD="class: xl69"]X[/TD]
[TD="class: xl72, width: 448, colspan: 7"]Front entry swept or shoveled[/TD]
[TD="class: xl66"]1[/TD]
[TD="class: xl66"]1[/TD]

[TD="class: xl66"] [/TD]
[TD="class: xl69"]X[/TD]
[TD="class: xl72, width: 448, colspan: 7"]Landscaping in good appearance[/TD]
[TD="class: xl66"]1[/TD]
[TD="class: xl66"]1[/TD]

[TD="class: xl66"] [/TD]
[TD="class: xl69"]X[/TD]
[TD="class: xl72, width: 448, colspan: 7"]Music turned on in store and at correct volume[/TD]
[TD="class: xl66"]1[/TD]
[TD="class: xl66"]1[/TD]

[TD="class: xl66"]X[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl73, colspan: 7"]Windows cleaned, Escalator and Elevator clean and free of debris[/TD]
[TD="class: xl66"]1[/TD]
[TD="class: xl66"]0[/TD]

[TD="class: xl66"] [/TD]
[TD="class: xl69"]X[/TD]
[TD="class: xl73, colspan: 7"]Correct sale event signing displayed[/TD]
[TD="class: xl66"]1[/TD]
[TD="class: xl66"]1[/TD]

[TD="class: xl66"] [/TD]
[TD="class: xl69"]X[/TD]
[TD="class: xl73, colspan: 7"]All ceiling tiles free of water stains and in good condition[/TD]
[TD="class: xl66"]1[/TD]
[TD="class: xl66"]1[/TD]

[TD="class: xl67"] [/TD]
[TD="class: xl71"]X[/TD]
[TD="class: xl74, width: 448, colspan: 7"]Carpets cleaned and vacuumed [/TD]
[TD="class: xl68"]1[/TD]
[TD="class: xl68"]1
[/TD]

</tbody>
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Re: Help with IF Function

Hi,

=IF(OR(A12="X",B12="X"),1,0)
 
Upvote 0
Re: Help with IF Function

Or like this

=--(A12&B12="XX")
 
Upvote 0
Re: Help with IF Function

You're welcome.
 
Upvote 0
Re: Help with IF Function

"Either A12 or B12 will have an X, never both."

=IF((A12="x")+(B12="x")=1, 1, 0)

or
=--ISODD((A12="x")+(B12="x"))
 
Upvote 0
Re: Help with IF Function

mikerickson, I misread it.

Modified version of my above formula

=--(A12&B12="X")
 
Upvote 0
Re: Help with IF Function

Hi,

=IF(OR(A12="X",B12="X"),1,0)


Im sorry for the confusion, but I made a mistake. If there is an "X" in the "NO" Column (A12), then I need it to return a Value of Zero. If there is an "X" in the "YES" Column(B12), then it should return a Value of 1

Thanks again for your help!
 
Upvote 0
Re: Help with IF Function

Thanks guys for the help, and both work, however, I made a mistake.

If there is an "X" in the "NO" Column (A12), then I need it to return a Value of Zero. If there is an "X" in the "YES" Column(B12), then it should return a Value of 1

Thanks!
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,306
Members
452,633
Latest member
DougMo

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