# how do I write a better formula?

#### samlee1981

##### New Member
I have the following If formula...

[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]=IF(D5-15<P\$3,"OVERDUE","NOT DUE")=IF(J5=isnumber,I5,"")

How do I write this correctly?
The first part works but the second nested IF is not correct.

D Column is course date, I Column is todays date minus 15 days (set to remind me that payment needs to have been made), J Column is payment received. P3 is todays date.

I want to say - if J5 contains a number, (e.g the date payment was received), make I5 blank. At the moment it just says overdue.

Any ideas how to reword it?

Many thanks
[/FONT]

### Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

#### gaz_chops

##### Well-known Member
If you are using < or > in your formula, put a space either side when posting it on the forum, otherwise it will cut it off at the < >

#### samlee1981

##### New Member
[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]=IF(D5-15<P\$3,"OVERDUE","NOT DUE")=IF(J5=isnumber, I5="")[/FONT]

#### samlee1981

##### New Member
for some reason, I can't copy whole of if formula over to show you!

#### AlanY

##### Well-known Member

for some reason, I can't copy whole of if formula over to show you!

=if(B1>5, "Yes","No")

put extra spaces like this

=if(B1 > 5, "Yes","No")

#### samlee1981

##### New Member
[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]=IF ( D5-15 < P\$3, " OVERDUE", " NOT DUE")= IF ( J5 = isnumber, I5 ="" )[/FONT]

#### gaz_chops

##### Well-known Member

Maybe

=if(isnumber(J5),"",IF (D5-15 < P\$3,"OVERDUE","NOT DUE"))

Last edited:

#### samlee1981

##### New Member
it works! very grateful. thanks!

You're welcome.

Replies
0
Views
40
Replies
1
Views
79
Replies
3
Views
120
Replies
3
Views
135
Replies
3
Views
303