Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
sbruner
 
Posts: n/a
Default If-Then Statements

For Cell C1: IF Cell A1= "W", Then C1=B1/4.
IF Cell A1= "BW", Then C1=B1/2
IF Cell A1= "SM", Then C1 = B1/2
IF Cell A1= "M", Then C1 = B1


How do I write an if statement in C1 so that it will return these varied
values of B1 depending on the text in A1? Thanks
  #2   Report Post  
Trevor Shuttleworth
 
Posts: n/a
Default

In cell C1, put the formula:

=IF(A1="W",B1/4, IF(A1="BW", B1/2, IF(A1="SM", B1/2,
IF(A1="M",B1,"error?"))))

Regards

Trevor



"sbruner" wrote in message
...
For Cell C1: IF Cell A1= "W", Then C1=B1/4.
IF Cell A1= "BW", Then C1=B1/2
IF Cell A1= "SM", Then C1 = B1/2
IF Cell A1= "M", Then C1 = B1


How do I write an if statement in C1 so that it will return these varied
values of B1 depending on the text in A1? Thanks



  #3   Report Post  
JE McGimpsey
 
Posts: n/a
Default

One way:

=IF(A1="W",B1/4,IF(OR(A1="BW",A1="SM"),B1/2,IF(A1="M",B1,"")))



In article ,
"sbruner" wrote:

For Cell C1: IF Cell A1= "W", Then C1=B1/4.
IF Cell A1= "BW", Then C1=B1/2
IF Cell A1= "SM", Then C1 = B1/2
IF Cell A1= "M", Then C1 = B1


How do I write an if statement in C1 so that it will return these varied
values of B1 depending on the text in A1? Thanks

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
Nesting more than nine IF statements in Excel Alexander Walsh via OfficeKB.com Excel Worksheet Functions 13 June 1st 05 06:31 PM
More than 7 IF statements in one arguement smithers2002 Excel Worksheet Functions 9 April 21st 05 01:59 PM
VLOOKUP + IF STATEMENTS Excel Discussion (Misc queries) 6 April 1st 05 08:43 AM
Nested IF statements John Simons Excel Worksheet Functions 14 February 16th 05 06:17 AM
If statements Mark Excel Worksheet Functions 3 November 2nd 04 08:39 PM


All times are GMT +1. The time now is 09:00 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"