If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > If statements

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-02-04, 10:06
carley465 carley465 is offline
Registered User
 
Join Date: Feb 2004
Location: Vermont
Posts: 53
Question If statements

In Excel can you do an "If" statement. Such as" if B1>50 then B1*4, Else B1*5.

CAT
__________________
CAT :-D
Reply With Quote
  #2 (permalink)  
Old 03-02-04, 21:53
goodthing44 goodthing44 is offline
Registered User
 
Join Date: Feb 2004
Posts: 3
NO. follow this if(b>1,a+b,b+c)
Reply With Quote
  #3 (permalink)  
Old 03-03-04, 06:00
DavidCoutts DavidCoutts is offline
Registered User
 
Join Date: Jan 2004
Location: Aberdeen, Scotland
Posts: 1,067
HI

Sorry about the other post did it to quickly I just tried to get rid of the error message for you without checking to hard.

The only way i can think of doing this is by using VBA if you actually wawnt the Value of B1 to change.

Something like this

Code:
If Range("B1").Value > 50 Then
    Range("B1").Formula = Range("B1").Value * 4
Else
    Range("B1").Formula = Range("B1").Value * 5
End If
or if you want to run the if statement in any other cell you can just use the formula

=IF(B1>50,B1*4,B1*5)

Ive tried both of these methods and they both produce the correct results.

David
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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