Results 1 to 3 of 3

Thread: If statements

  1. #1
    Join Date
    Feb 2004
    Location
    Vermont
    Posts
    53

    Question Unanswered: If statements

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

    CAT
    CAT :-D

  2. #2
    Join Date
    Feb 2004
    Posts
    3
    NO. follow this if(b>1,a+b,b+c)

  3. #3
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •