Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default complex "if" statement

Is there any way to write a formula that will examine the cell contents, and
return one of three different values?
I want the formula to look at column A, and if column A value is less than
100, return "50", if it's 100 or more, to return "100", and if it's null or
0, to return "0."
I'm using Office 2003
Thanks,
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rob Rob is offline
external usenet poster
 
Posts: 718
Default complex "if" statement

you can use another if statement as one of your arguments in your if statement

eg

=if( [logicaltest1] , "test 1 true" , if ( [logicaltest2] , "test 2 true" ,
"neither true" ) )
In your case:
=if(A1=100,100,if(A1="",0,50))

"Patience" wrote:

Is there any way to write a formula that will examine the cell contents, and
return one of three different values?
I want the formula to look at column A, and if column A value is less than
100, return "50", if it's 100 or more, to return "100", and if it's null or
0, to return "0."
I'm using Office 2003
Thanks,

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default complex "if" statement

Type this into Cell B1:

=IF(A1=0, 0, IF(A1<100, 50, IF(A1=100, 100, 0)))

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default complex "if" statement

On Tue, 14 Jun 2005 05:49:01 -0700, "Patience"
wrote:

Is there any way to write a formula that will examine the cell contents, and
return one of three different values?
I want the formula to look at column A, and if column A value is less than
100, return "50", if it's 100 or more, to return "100", and if it's null or
0, to return "0."
I'm using Office 2003
Thanks,


=IF(A1=0,0,IF(A1<100,50,100))


--ron
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
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
embedding "ISERROR" function into an "IF" statement [email protected] Excel Worksheet Functions 8 January 4th 07 12:01 AM
Complex if test program possible? If "value" "value", paste "value" in another cell? jseabold Excel Discussion (Misc queries) 1 January 30th 06 10:01 PM
vba: How do I write a "For Each Statement" nested in a "With Statement"? Mcasteel[_32_] Excel Programming 0 November 8th 04 10:04 PM
vba: How do I write a "For Each Statement" nested in a "With Statement"? Mcasteel[_27_] Excel Programming 1 November 8th 04 09:23 PM


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