IF function for multiple variables

D

DaS

I am trying to make a cell equal a specific number based upon the text of
another cell,i.e., if cell A3 is Saturday, then I want G3 to equal 22. If
it's Sunday then I want G3 to be 75. I've tried using the following format
from another post, but all i get is the very last number meaning that none of
them are true:

=IF(A1<=99,A1+(A1*0.15),IF(A1<=2000,A1+(A1*0.1),IF(A1<=5000,A1+(A1*0.7),IF(A1<=15000,A1+(A1*0.5),A1+(A1*0.4)))))

is it beacuse I'm looking for text? Do I need to use another formula?
 
R

Ron Rosenfeld

I am trying to make a cell equal a specific number based upon the text of
another cell,i.e., if cell A3 is Saturday, then I want G3 to equal 22. If
it's Sunday then I want G3 to be 75. I've tried using the following format
from another post, but all i get is the very last number meaning that none of
them are true:

=IF(A1<=99,A1+(A1*0.15),IF(A1<=2000,A1+(A1*0.1),IF(A1<=5000,A1+(A1*0.7),IF(A1<=15000,A1+(A1*0.5),A1+(A1*0.4)))))

is it beacuse I'm looking for text? Do I need to use another formula?

There are many things you could be doing wrong. However, if you don't post the
actual formula you are using, we'd only be guessing. You also need to post the
exact contents, and formatting, of A3.

Clearly, the formula you posted is not looking for a Saturday or Sunday in A3.
--ron
 
T

T. Valko

What should happen if A3 is neither Sat nor Sun?

Try something like this:

=IF(A3="Saturday",22,IF(A3="Sunday",75,0))

0 means A3 is neither Sat nor Sun.
 
D

DaS

=if(a3="Saturday",420,if(a3="sunday",348,if(a3="friday",378,172)))

A3 actually is a date 1/1/08, but its fromatted to display Tuesday. 172 is
what's input in to the formulated cell, so that tells me it's not recognizing
a3's cell contents. Sorry about the lack of information previously.

I tried the =IF(A3="Saturday",22,IF(A3="Sunday",75,0)) formula and all it
returned was a -...it was even tried on a cell that displayed Sunday.

Thanks for your help everyone
 
D

Dana DeLouis

=if(a3="Saturday",420,if(a3="sunday",348,if(a3="friday",378,172)))

Just another option:

=MOD(1711668,MAX(WEEKDAY(A1,2),4)*57+121)
 
D

David Biddulph

If A3 is a date, IF(a3="Saturday",... won't work. You could try
IF(TEXT(A3,"dddd")="Saturday",...
 

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