IF function not working

defender

New Member
Joined
Dec 24, 2017
Messages
41
Hi,

Not sure why i can't get this basic IF function to work.

if the value in cell G3 = 0 then i want to return the word 'Expired' else leave the call blank.

This is what i tried but it didn't work

=IF(G3="0", "Expired", "")
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Do not put quotes around values that you intend to be treated as numeric. If G3 is empty or it contains the numeric value zero, the formula should be:

=IF(G3 = 0, "Expired", "")
 
Upvote 0
You might want to also include an additional test...

=IF(ISNUMBER(G3),IF(G3=0, "Expired", ""),"")
 
Last edited:
Upvote 0
when does your formula not work?

See if this works.

=IF(G3,"","Expired")
 
Upvote 0
thanks guys its working now.

I got one more thing which i'm not able to sort. i'm using the formula F3-TODAY()....where F3 is a date in the future. This works on for the first cell i entered this formula in, but if i want to drag down the formula i get -43141 in the all the other cells, but i want them to remain blank until a value is added in F4, F5, F6.....etc
 
Upvote 0
Hi,


Book1
FG
32/11/20181
4 
Sheet61
Cell Formulas
RangeFormula
G3=IF(F3<>"",F3-TODAY(),"")
G4=IF(F4<>"",F4-TODAY(),"")
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,207
Members
452,618
Latest member
Tam84

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