+ Reply to Thread
Results 1 to 5 of 5

Creating function in Excel 2010

  1. #1
    Registered User
    Join Date
    05-30-2012
    Location
    Norway
    MS-Off Ver
    Excel 2010
    Posts
    38

    Creating function in Excel 2010

    Hi,

    I have a question I hope you can help me with.

    I want a function to work like this:

    When a number in one cell is less then 1000 it should return in another 0. When it pass 1000 (for example 1200) it should return (1200-1000)*0,29 = 58
    If the number in the cell is 2000 it should return (2000-1000) * 0.29 = 290

    BUT, is it for example 900 (less than 1000) it should be 0.

    Hope this explaination wasn't to bad - if you need any further information - please ask

    Kind Regards
    JohnnyWalker

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Creating function in Excel 2010

    Hi,

    One way

    =IF(A1<1000,0,(A1-1000)*0.29)
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Creating function in Excel 2010

    Welcome to the forum!

    So, I'm going to point out that I thought this question was going to be about user defined functions, when instead this is more about, which is logic-dependent algebra.

    Okay.
    A1: the cell with the number
    B1: the cell with the output function
    Please Login or Register  to view this content.
    Note that this throws 0 for A1 = 1000 whether it's LESS THAN as well as LESS THAN OR EQUAL TO, because of the algebra; so it doesn't matter in this case which we use, but I did not from the OP understand which way the logic was supposed to take it.

  4. #4
    Registered User
    Join Date
    05-30-2012
    Location
    Norway
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: Creating function in Excel 2010

    Hi again!

    Thank you two really much. THis answered my question, and I managed. I will probably use this forum next time I'm wondering about something (new job where Excel is a big part of the day, so it is very useful with this)

  5. #5
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Creating function in Excel 2010

    I know it's a little late, but here's an alternate version of the formula:
    Please Login or Register  to view this content.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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