Formula Help

iimmie

New Member
Joined
Nov 13, 2011
Messages
24
Hi,
I am trying to figure out how to write the following:
if cell a1 or cell b1 has a number greater then zero in it, enter a #1 in cell c1

I appreciate the help once again
Thank you
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Hi,
I am trying to figure out how to write the following:
if cell a1 or cell b1 has a number greater then zero in it, enter a #1 in cell c1

I appreciate the help once again
Thank you

Something like...

=IF(MIN(A1:B1)>0,1,"")

=(MIN(A1:B1)>0)+0
 
Upvote 0
Something like...

=IF(MIN(A1:B1)>0,1,"")

=(MIN(A1:B1)>0)+0
If the OP says: any one of the cells is greater than 0 then it should return 1 so should the formula not be:
=IF(MAX(A1:B1)>0,1,"")
 
Upvote 0
If the OP says: any one of the cells is greater than 0 then it should return 1 so should the formula not be:
=IF(MAX(A1:B1)>0,1,"")

Right. Post #4 provides alternatives. Re-capping for iimmie:

=IF(MAX(A1:B1)>0,1,0)

=(MAX(A1:B1)>0)+0

=IF(OR(A1>0,B1>0),1,0)

=OR(A1>0,B1>0)+0

In case A1 and/or B1 might house text values

=IF(OR(N(A1)>0,N(B1)>0),1,0)

The first two would be good enough though.
 
Upvote 0
Thank you to everyone, you all rock!


Right. Post #4 provides alternatives. Re-capping for iimmie:

=IF(MAX(A1:B1)>0,1,0)

=(MAX(A1:B1)>0)+0

=IF(OR(A1>0,B1>0),1,0)

=OR(A1>0,B1>0)+0

In case A1 and/or B1 might house text values

=IF(OR(N(A1)>0,N(B1)>0),1,0)

The first two would be good enough though.
 
Upvote 0

Forum statistics

Threads
1,214,982
Messages
6,122,573
Members
449,089
Latest member
Motoracer88

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