#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default If Then

I am trying to program a cell to look at the total in another cell which has
unlimited possibilities. From the total I want to have it look at a total
and if it is <= or = to a number then it assigns a value. e.g. If the
total is 225 in one cell then this is greater than 200 and less than 250 so
it equals $125. Thanks for your help!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default If Then

=IF(AND(A1<=250,A1=200),125,"")

--

Vasant

"impressions" wrote in message
...
I am trying to program a cell to look at the total in another cell which

has
unlimited possibilities. From the total I want to have it look at a total
and if it is <= or = to a number then it assigns a value. e.g. If the
total is 225 in one cell then this is greater than 200 and less than 250

so
it equals $125. Thanks for your help!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,173
Default If Then

You can use a Select Case construct like so

Select Case Range("A1").Value
Case Is <10
'Do This
Case is <=20
'Do That
Case is <=30
'Do Something Else
Case Else
'Do Something Totally Different
End Select
--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS

"impressions" wrote in message
...
I am trying to program a cell to look at the total in another cell which
has
unlimited possibilities. From the total I want to have it look at a total
and if it is <= or = to a number then it assigns a value. e.g. If the
total is 225 in one cell then this is greater than 200 and less than 250
so
it equals $125. Thanks for your help!



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



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