+ Reply to Thread
Results 1 to 9 of 9

Help with IF function

  1. #1
    Registered User
    Join Date
    01-18-2010
    Location
    Chicago, IL USA
    MS-Off Ver
    Excel 2003
    Posts
    9

    Help with IF function

    Hi,

    I want to evaluate a number entered in cell A11 as a multiplier for a formula in cell A20. Cannot figure out how to use IF in this case.

    The user enters in a number in cell A11 - either 2, 3, 4, 6, or 8.

    These whole numbers stand for a multiplier value that I want to use for a formula in cell A20 to calculate. The A20 result is then used in other cell calculations.
    2 = *1
    3 = *1.5
    4 = *2
    6 = *3
    8 = *4

    Rick

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,494

    Re: Help with IF function

    =A11/2 maybe?


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    01-18-2010
    Location
    Chicago, IL USA
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Help with IF function

    No.

    If data entered in A11 equal 3 then the value I want returned is 1.5. 1.5 is the number I want to use as my multiplier in cell A20.

  4. #4
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Help with IF function

    You can just reference the formula above in A20.

    A20 = somethingsomething*(A11/2)

    Or, if you're really hellbent on using an IF statement:

    =IF(A11=2,1,IF(A11=3,1.5,IF(A11=4,2,IF(A11=6,3,IF(A11=8,4)))))*whatever

    But nesting IFs needs to be entered as an array, using Ctrl+Shift+Enter
    Last edited by daffodil11; 07-19-2013 at 04:13 PM. Reason: the 2 became a 3!

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Help with IF function

    Create a 2 column table like this...

    2.....1
    3.....1.5
    4.....2
    6.....3
    8.....4

    Let's assume that table is in the range A1:B5.

    Then, you would use something like this:

    =VLOOKUP(A11,A1:B5,2,0)
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Help with IF function

    Quote Originally Posted by daffodil11 View Post
    But nesting IFs needs to be entered as an array, using Ctrl+Shift+Enter
    No need to array enter. Just a normal enter will do.

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,494

    Re: Help with IF function

    I wonder, are you always so abrupt with strangers that you are looking to for assistance? Does that work for you?

    Perhaps worth making the point that your thread has had 39 views and only one response. What do you think the reason for that may be.

    I was under the impression that 3/2 was 1.5. Hence, if A11 contains 3, the formula =A11/2 would return 1.5 ... which you would use as your multiplier in the formula in A20. However, I do not know what that formula looks like so I can be of little assistance other than guessing at your requirements.

    You may wish to provide a sample workbook with some typical data indicating your desired and expected results.

    Regards, TMS

  8. #8
    Registered User
    Join Date
    01-18-2010
    Location
    Chicago, IL USA
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Help with IF function

    Thank you all so much. The nested IF worked just fine.

  9. #9
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Help with IF function

    You're welcome. We appreciate the feedback!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. index function error using match function to get data from a cell in an array
    By mabildgaard in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-17-2013, 02:21 AM
  2. Replies: 0
    Last Post: 01-19-2013, 01:35 PM
  3. Replies: 1
    Last Post: 03-21-2012, 11:22 AM
  4. Replies: 2
    Last Post: 03-20-2009, 01:29 PM
  5. Excel - User Defined Function Error: This function takes no argume
    By BruceInCalgary in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-18-2006, 04:05 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1