+ Reply to Thread
Results 1 to 8 of 8

Formula to add, based on number variables

  1. #1
    Registered User
    Join Date
    03-01-2017
    Location
    Oslo, Norway
    MS-Off Ver
    2013
    Posts
    5

    Formula to add, based on number variables

    Hi
    Can someone help me with a formula please?

    A1 holds a number and B2 a different.
    Bases on the number in A1, I need to add B1 with a given number, and get the result in C1.
    Say A1 Is less than 100. Then I need to add B1 with 2.
    If A1 is less than 500 but more than 100, then I need to add B1 with 1,5
    If A1 is less than 2000 but more than 500, then I need to add B1 with 1,2
    And If A1 is more than 2000, then I need to add B1 with 1,1
    thank you

    i am using excel 2013

  2. #2
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2021
    Posts
    5,994

    Re: Formula to add, based on number variables

    Try this ...

    =B1+LOOKUP(A1,{0,100,500,2000},{2,1.5,1.2,1.1})

  3. #3
    Registered User
    Join Date
    03-01-2017
    Location
    Oslo, Norway
    MS-Off Ver
    2013
    Posts
    5

    Re: Formula to add, based on number variables

    Did not work for me...?
    Dont know what’s wrong, but i cant use the formula you have here (also tried to translate "lookup" to lokal language).

  4. #4
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2021
    Posts
    5,994

    Re: Formula to add, based on number variables

    Change "," to ";" ?

  5. #5
    Registered User
    Join Date
    03-01-2017
    Location
    Oslo, Norway
    MS-Off Ver
    2013
    Posts
    5

    Re: Formula to add, based on number variables

    Like this?
    (A1;{0,100,500,2000};{2,1.5,1.2,1.1})
    or
    (A1;{0;100;500;2000};{2;1.5;1.2;1.1})

  6. #6
    Registered User
    Join Date
    03-01-2017
    Location
    Oslo, Norway
    MS-Off Ver
    2013
    Posts
    5

    Re: Formula to add, based on number variables

    this solution
    (A1;{0,100,500,2000};{2,1.5,1.2,1.1})
    gives me autocorect
    (A1;{01005002000};{2,1.5,1.2,1.1})

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,457

    Re: Formula to add, based on number variables

    Cell A3 in the sheet will show it Oslo-style...
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  8. #8
    Registered User
    Join Date
    03-01-2017
    Location
    Oslo, Norway
    MS-Off Ver
    2013
    Posts
    5

    Re: Formula to add, based on number variables

    Thx.
    Got it

+ 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. Max number of occurrences based on two variables
    By xtort81 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-25-2013, 03:26 PM
  2. counting based ona number of variables.
    By vipa2000 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 PM
  3. counting based ona number of variables.
    By vipa2000 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 PM
  4. [SOLVED] counting based ona number of variables.
    By Bob Phillips in forum Excel Formulas & Functions
    Replies: 22
    Last Post: 09-06-2005, 11:05 AM
  5. [SOLVED] counting based ona number of variables.
    By Bob Phillips in forum Excel Formulas & Functions
    Replies: 22
    Last Post: 09-06-2005, 07:05 AM
  6. [SOLVED] counting based ona number of variables.
    By vipa2000 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  7. counting based ona number of variables.
    By vipa2000 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  8. counting based ona number of variables.
    By vipa2000 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM

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