If Formula

omairhe

Well-known Member
Joined
Mar 26, 2009
Messages
2,040
Office Version
  1. 2019
Platform
  1. Windows
Peace,

what formula that checks cell F2 and cell G2 for 0/blank values.

If both the above cells are 0/blank then give output 0 otherwise give output 1.

Thanks.
 
Try this assuming F2 and G2 are always positive numbers or blank.

=IF(OR(F2>0,G2>0),1+(F2=G2),0)
 
Upvote 0

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Dear Jonmo1,

It seems that I need a new change in the recent formula ..

Considering H2 to be my resulting cell the following should be the output for respective scenario... Here I added a new constant = '3'.. IF the cells F2 or G2 or both are blank thus output 3, rest of formula being the same.

F2....G2....H2

10....10.....2

5......5......2

0......0......0

1......0......1

0......1......1

....... ......3

0...... ......3

......0......3

60...50.....1



will appreciate..
 
Upvote 0
Ok, you've really got to stop the 'Bait and switch'

How do you do A : by doing x
How do you do B : by doing y
Now how do you do both A and B at the same time :by doing z
Great, but what I really want is A B and C...

Ask what you really want in the first place.


Anyway, that said.
Try

=IF(OR(F2="",G2=""),3,IF(OR(F2>0,G2>0),1+(F2=G2),0))
 
Upvote 0

Forum statistics

Threads
1,214,991
Messages
6,122,628
Members
449,095
Latest member
bsb1122

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