Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
DAS DAS is offline
external usenet poster
 
Posts: 26
Default IF function for multiple variables

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?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default IF function for multiple variables

On Fri, 24 Aug 2007 10:00:00 -0700, DaS wrote:

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),I F(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
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default IF function for multiple variables

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.

--
Biff
Microsoft Excel MVP


"DaS" wrote in message
...
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?



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
DAS DAS is offline
external usenet poster
 
Posts: 26
Default IF function for multiple variables

=if(a3="Saturday",420,if(a3="sunday",348,if(a3="fr iday",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

"T. Valko" wrote:

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.

--
Biff
Microsoft Excel MVP


"DaS" wrote in message
...
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?




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default IF function for multiple variables

On Fri, 24 Aug 2007 10:52:05 -0700, DaS wrote:

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


=IF(WEEKDAY(A3)=7,420,IF(WEEKDAY(A3)=1,348,IF(WEEK DAY(A3)=6,378,172)))
--ron


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default IF function for multiple variables

Try this:

=IF(A3="","",CHOOSE(WEEKDAY(A3,2),172,172,172,172, 378,420,348))

--
Biff
Microsoft Excel MVP


"DaS" wrote in message
...
=if(a3="Saturday",420,if(a3="sunday",348,if(a3="fr iday",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

"T. Valko" wrote:

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.

--
Biff
Microsoft Excel MVP


"DaS" wrote in message
...
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?






  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
DAS DAS is offline
external usenet poster
 
Posts: 26
Default IF function for multiple variables

That did it Ron, thank you very much!

"DaS" wrote:

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?

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default IF function for multiple variables

Slight tweak:

=IF(COUNT(A3),CHOOSE(WEEKDAY(A3,2),172,172,172,172 ,378,420,348),"")

--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
Try this:

=IF(A3="","",CHOOSE(WEEKDAY(A3,2),172,172,172,172, 378,420,348))

--
Biff
Microsoft Excel MVP


"DaS" wrote in message
...
=if(a3="Saturday",420,if(a3="sunday",348,if(a3="fr iday",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

"T. Valko" wrote:

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.

--
Biff
Microsoft Excel MVP


"DaS" wrote in message
...
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?







  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default IF function for multiple variables

On Fri, 24 Aug 2007 11:22:01 -0700, DaS wrote:

That did it Ron, thank you very much!

"DaS" wrote:

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?



Glad to help
--ron
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 947
Default IF function for multiple variables

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

Just another option:

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

--
Dana DeLouis


"DaS" wrote in message
...
=if(a3="Saturday",420,if(a3="sunday",348,if(a3="fr iday",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

"T. Valko" wrote:

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.

--
Biff
Microsoft Excel MVP


"DaS" wrote in message
...
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?








  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default IF function for multiple variables

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

"Dana DeLouis" wrote in message
...
=if(a3="Saturday",420,if(a3="sunday",348,if(a3="fr iday",378,172)))


Just another option:

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

--
Dana DeLouis


"DaS" wrote in message
...
=if(a3="Saturday",420,if(a3="sunday",348,if(a3="fr iday",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

"T. Valko" wrote:

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.

--
Biff
Microsoft Excel MVP


"DaS" wrote in message
...
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?







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple variables-SOS Ang Excel Worksheet Functions 3 April 27th 07 08:24 PM
look for a value with multiple variables Andrea Excel Discussion (Misc queries) 2 January 18th 07 01:24 PM
Index Match function for multiple linked variables Bob Excel Worksheet Functions 13 November 23rd 05 01:56 AM
Index Match function for multiple linked variables Bob Excel Worksheet Functions 0 November 22nd 05 03:12 AM
if function multiple variables cin Excel Worksheet Functions 2 September 8th 05 09:32 PM


All times are GMT +1. The time now is 11:18 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"