1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Help with "IF" Function

Discussion in 'Business Applications' started by Frankie6925, Jul 17, 2006.

Thread Status:
Not open for further replies.
  1. Frankie6925

    Frankie6925 Thread Starter

    Joined:
    Sep 5, 2005
    Messages:
    31
    I cannot seem to figure this out. Problem:
    If A1 is 1-100 let B1 = 15.
    If A1 is 101-150 let B1 = 20.
    If A1 is 151-200 let B1 = 25.
    If A1 is 201-300 let B1 = 35.

    Thank you for your help.

    If A1 is 151-200 let B1 = 25.
     
  2. Zack Barresse

    Zack Barresse

    Joined:
    Jul 25, 2004
    Messages:
    5,452
    Hi there,

    Use this ..

    =LOOKUP(A1,{1,15;101,20;151,25;201,35})

    Now this takes care of almost everything you stated, the only part it doesn't is the upper end. You can do this one of two ways, 1) entering the condition along with the value in this formula, or 2) nesting it in an IF function. To trap anything <1 (less than one) you will also need another IF statement. You might use something like this to trap for both...

    =IF((A1<1)+(A1>300),"Out of range",LOOKUP(A1,{1,15;101,20;151,25;201,35}))

    HTH
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/483936

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice