How do I make a formula read a result rather than a formula

G

Guest

I am trying to make a formula read from a cell that contains a formula. Does
anyone know how to make the subsequent formula read a result rather than the
formula. Here's an example of the formula.
=IF(A23="Monday","CREW"," ")

Cell A23 has the formula =A27 that is formatted to return day of the week
from another cell that has a date 7/3/06. Which returns Monday on the
worksheet. I believe the formula is seeing =A27 instead of the result
Monday, and this is why the if statement is false. Any Ideas????
 
G

Guest

Hi Chris,

the cell a23 is formated to show Monday but its result is 2 try to use

=if(a23=2,"CREW","")

hope this helps
reagards from Brazil
Marcelo

"Chris" escreveu:
 
G

Guest

I suspect that test isn't seeing the formula, but rather the value that Excel
uses to represent the date 7/3/06. If you're showing Monday by formatting a
date value, the VALUE hasn't changed, so the test will fail. You should
either change the value to be the weekday =text(a27,"dddd") in cell A23, or
test for the appropriate weekday within the if function:
=if(weekday(a23,1)=2,"CREW", " ")
 
G

Guest

Thanks, this worked great! Now, how would I write it if I needed multiple IF
statements? For example if the result was a Tuesday instead?

Chris
 
V

VBA Noob

Not sure what your criteria is so replaced with day of week

=IF(WEEKDAY(A23)=6,"Saturday",IF(WEEKDAY(A23)=7,"Sunday",IF(WEEKDAY(A23)=1,"Monday",IF(WEEKDAY(A23)=2,"Tuesday",IF(WEEKDAY(A23)=3,"Wednesday",IF(WEEKDAY(A23)=4,"Thursday",IF(WEEKDAY(A23)=5,"Friday",""))))))
 
V

VBA Noob

or

=CHOOSE(WEEKDAY(A23),"Saturday","Monday", "Tuesday", "Wednesday"
"Thursday", "Friday","Sunday")

Change Days to your tex
 

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