Compare formula result with text

K

KimW

How do I compare the results of a formula with the text in another field?
Example: I have a formula that is calculating a date (mm/dd/yyyy) in cell A1.
I want to compare that to the Month (text) in cell A4 and in cell A5 return
"Goal Setting" if the result is TRUE and "Monthly Feedback" if the result is
FALSE
 
J

JLatham

If A1 is actually formatted as a date and not text, then this should work for
you:

=IF(ISNA(MATCH(A4,{"January","February","March","April","May","June","July","August","September","October","November","December"},0)),"MonthlyFeedback",IF(MONTH(A1)=MATCH(A4,{"January","February","March","April","May","June","July","August","September","October","November","December"},0),"Goal
Setting","MonthlyFeedback"))

Change the list of months to "Jan","Feb", etc. if you're using abbreviations
in A4.

The IF(ISNA()) portion of the formula will cause a "Monthly Feedback" entry
to appear if one of the month list entries is not in A4 (as blank, or
misspelled).
 
P

Peo Sjoblom

If the month in A4 is text as in October and the result in A1 is for
instance 10/28/2009 than you can use

=IF(TEXT(A1,"mmmm")=A4,"Goal Setting","Monthly Feedback")

--


Regards,


Peo Sjoblom
 

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