IF Formula to produce coloured statements

G

Guest

Dear Experts,

I've quickly scanned this forum and searched the Excel help but to no
avail...could you please assist me?

I have an IF formula as follows:

=IF(G2<=D21,"OVERDUE","OK")

I want the results (either OVERDUE or OK) to be displayed in different
colours - OVERDUE in red and OK in green. I've tried using the [red] and
[green] tags but in the formula it mistakes them for the true/false
statements.

Is there a way to do this?

(FYI, the IF formula is based on dates...I don't know if this is relevant
but the spreadsheet is to show whether or not recurring work/tasks are
overdue and are based on when they were last completed, add on however many
months before the next one is due and then this IF formula reflects the
status of those tasks).

Regards,
Kylii
 
G

Guest

In addition to this...

I now have to have an additional IF statement in the same field. I don't
know if a nested IF will work since its the same as the current one, OR IF
another factor is reached...if this doesnt make sense I will explain in more
detail...
 
O

OJ

Kylii,
A worksheet formula cannot effect a change on the formatting (or any
other part, for that matter) of the sheet itself, it can only return a
value to the cell in which it resides. In order to achieve the effect
you are describing you need to look at Conditional Formatting in the
Format menu and in help.

Hth,
O
 
G

Guest

OJ,

Thanks for your help...

I have another question on IF formulae...

I want a cell to display an IF statement if the data in one of 2 cells
displays a certain result.

I've tried the following:
=IF(Data!A1:B1="Overdue","OVERDUE","OK")
to see whether or not the data in Data!A1 or B1 equals 'Overdue' to then
display it as 'Overdue' on the main worksheet, else to display 'Ok'. Is this
possible with just one IF statement?

Kylii
 
G

GaryDK

Try this, Kylii -

=IF(OR(Data!A1="Overdue",Data!B1="Overdue"),"OVERDUE","OK")

Gary
(less two thru five for direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top