If Statement

nobbsy

New Member
Joined
Jul 11, 2005
Messages
36
Book1
ABCD
1Today'sDate3-Oct-06
2PriorityForcastCompletionTrafficLight
3Task1Priority1-Oct-06Red
4Task2NonPriority12-Dec-06Green
5Task3NonPriority1-Sep-06Orange
6Task4Priority13-Nov-06Green
Sheet1


I would like the following in a formula
Green = Today's date is Less Than the Forecast Completion Date
Red = Greater than the Forecast Completion Date and is a priority
Orange = Greater than the Forecast Completion Date but is a non priority.
Thanks
 

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

PATSYS

Well-known Member
Joined
Mar 12, 2006
Messages
1,749
I would like the following in a formula
Green = Today's date is Less Than the Forecast Completion Date
Red = Greater than the Forecast Completion Date and is a priority
Orange = Greater than the Forecast Completion Date but is a non priority.
Thanks

In cell D3, type this formula:

Code:
=If($B$1<C3,"Green",if(and($B$1>C3,B3="Priority")=true,"Red",if(and(($B$1>C3,B3="Non Priority")=true,"Orange")))
Then copy down.
 

Brian from Maui

MrExcel MVP
Joined
Feb 16, 2002
Messages
8,458
Try,

=IF($B$1 < C3,"green",IF(AND($B$1 > C3,B3="priority"),"red","orange"))

If you want a visual of the colors, try Conditional Formatting
 

PATSYS

Well-known Member
Joined
Mar 12, 2006
Messages
1,749
Why is the formula I typed looks incorrect in the post ut when I try to change it, it looks correct in the edit mode?
 

Forum statistics

Threads
1,137,341
Messages
5,680,922
Members
419,945
Latest member
Carrie Sellers

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
Top