if commands

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Excel Training and help » If commands

If commands

resolvedResolved · Low Priority · Version 2007

Giles has attended:
Excel Intermediate course

If commands

Hi. I am trying to create a command that comes up with the following words: "ok", "pending" and "due", where more than 5 days from the given deadline is "ok", less than 5 days is "pending" and less than 2 days is "due". This is my formula: =IF(D2-C2>5,"ok")=IF(D2-C2<5,"pending")=IF(D2-C2<2,"due"). The result I get is "true" or "false". Also, I tried to create conditional formatting, so "ok" is green, "pending" is yellow and "due" is red. I think I've done this, but as the words aren't appearing, I can't check.

thanks

Giles

RE: if commands

Hello Giles,

Try this formula,
=IF(D2-C2<2,"Pending",IF(D2-C2<5,"Due","OK"))

I hope this resolves your question. If it has, please mark this question as resolved.

If you require further assistance, please reply to this post. Or perhaps you have another Microsoft Office question?

Have a great day.
Regards,

Mark
Microsoft Office Specialist Trainer


 

Excel tip:

DATEDIF function

The DATEDIF function is a worksheet function that computes the difference between two dates. This function is documented only in the help files for Excel 2000. It isn't documented in Excel 2002.
the formula function is:
=DATEDIF(Your age,Today(),"Y")
Y stands for year

View all Excel hints and tips


Server loaded in 0.08 secs.