if function equality = in empty cell

handri

Board Regular
Joined
Nov 25, 2017
Messages
88
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
jvB9ert
Hi,

I am newbie. My problem is =IF(A2=C2,"PASS","NG")
I need a result with text either PASS or NG. I
jvB9ert
f A2 is entered with equality with C2.
But when A2 and C2 cell is empty will cause the result is PASS. Due my formula is equality.
How do i get rid of this because i need the result cell is empty whenever A2 and C2 is empty.

thank in advanced
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Please try

Code:
[COLOR=#000000][FONT=&quot]=IF([COLOR=#0057d6]A2[/COLOR]="","",IF[COLOR=#006107]([/COLOR][COLOR=#0057d6]A2[/COLOR]=[COLOR=#006107]C2[/COLOR],"PASS","NG"[COLOR=#006107])[/COLOR])

[/FONT][/COLOR]

Kevin
 
Upvote 0
Hi,

If both A2 and C2 must to be empty , you can try this:-

=IF(A2&C2="","",IF(A2=C2,"PASS","NG"))

Nice solution Admiral. My response glossed over the important piece of both cells needing to be null. ?
 
Upvote 0
Thanks kev, it's working. Save my day. Thank you again!!

Please try

Code:
[COLOR=#000000][FONT='inherit']=IF([COLOR=#0057d6]A2[/COLOR]="","",IF[COLOR=#006107]([/COLOR][COLOR=#0057d6]A2[/COLOR]=[COLOR=#006107]C2[/COLOR],"PASS","NG"[COLOR=#006107])[/COLOR])

[/FONT][/COLOR]

Kevin
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,171
Members
453,021
Latest member
Justyna P

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