+ Reply to Thread
Results 1 to 9 of 9

Calculating ongoing if statements (>=,<=)

  1. #1
    Registered User
    Join Date
    03-12-2018
    Location
    Philadelphia, PA
    MS-Off Ver
    365
    Posts
    41

    Calculating ongoing if statements (>=,<=)

    Hi I am trying to return weighted figured depending on the dollar value in specific cell.

    I have attached a test file.

    The formula works up to the second IF statement then discontinues working.

    Any help would be greatly appreciated.


    Thanks!
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,091

    Re: Calculating ongoing if statements (>=,<=)

    In this IF statement, you need to start with your low values and work upwards. However, a LOOKUP or VLOOKUP would be more efficient:

    https://www.techonthenet.com/excel/formulas/lookup.php

    https://exceljet.net/excel-functions...ookup-function
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    03-12-2018
    Location
    Philadelphia, PA
    MS-Off Ver
    365
    Posts
    41

    Re: Calculating ongoing if statements (>=,<=)

    I have added a solution file.

    If anyone sees an issue with this an/or a more efficient solution I am all ears.

    Thanks!
    Attached Files Attached Files

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,091

    Re: Calculating ongoing if statements (>=,<=)

    I gave you two links with two possible approaches, both more efficient. You have not acknowledged my post, and just posted the exact same file again. What was it about the two solutions I suggested that you couldn't manage to follow? Where in the new workbook are you attempts at implementing them?

  5. #5
    Valued Forum Contributor jtakw's Avatar
    Join Date
    05-05-2018
    Location
    CA, USA
    MS-Off Ver
    2016
    Posts
    668

    Re: Calculating ongoing if statements (>=,<=)

    Hi,

    @AliGW, OP made a working IF formula in Post#3.

    Your IF statement can be shortened quite a bit, no need for all the AND functions:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    And, here's a LOOKUP alternative:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Refer to attached file for details.
    Attached Files Attached Files

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,091

    Re: Calculating ongoing if statements (>=,<=)

    I saw no LOOKUP or VLOOKUP in the file in post #3 - sorry that I missed it. It looked the same to me as the first file posted.

  7. #7
    Registered User
    Join Date
    03-12-2018
    Location
    Philadelphia, PA
    MS-Off Ver
    365
    Posts
    41

    Re: Calculating ongoing if statements (>=,<=)

    Hi AliGW,

    my apologies! The articles you posted are great source of information. Is the Vlookup function as accurate as the if/and statements?

    @jtakw - Thank you for the response.


    Thanks!

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,091

    Re: Calculating ongoing if statements (>=,<=)

    Why wouldn't it be? You are just setting the parameters in a table or lookup array instead of an IF statement.

    I STRONGLY suggest you use the articles to convert your IF statament first into a LOOKUP formula and then VLOOKUP (where you will first of all need to set up the lookup table).

    Have you actually tried either? If you had, you would see that they will give you the same (correct) answers.

    Both of my suggestions are a more EFFICIENT way of doing the same thing: that has nothing to do with accuracy.

  9. #9
    Valued Forum Contributor jtakw's Avatar
    Join Date
    05-05-2018
    Location
    CA, USA
    MS-Off Ver
    2016
    Posts
    668

    Re: Calculating ongoing if statements (>=,<=)

    Quote Originally Posted by Brapp2Smokin View Post
    Is the Vlookup function as accurate as the if/and statements?

    @jtakw - Thank you for the response.
    Regardless of what Function(s) are used in a formula, as long as it produces the correct results, then it's "accurate", there's no such thing as one function being "more" accurate than another...

    The difference or question is thou, which function to use, or which way to set up the formula, so that it is the "more" efficient way to solve the problem.

    If you're problem is "Solved", please mark the thread as such.

    Add rep would be appreciated, click the "Star" at the lower left corner of the posts you found helpful.

+ 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. Ongoing calculation
    By KevinW88 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-11-2017, 10:48 AM
  2. Help calculating formula using some nested if statements
    By Jupasto in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-09-2016, 09:42 AM
  3. Formula for calculating ongoing payment arrears????
    By gareth1904 in forum Excel Formulas & Functions
    Replies: 19
    Last Post: 04-17-2015, 08:46 AM
  4. Replies: 5
    Last Post: 11-13-2014, 05:59 PM
  5. Stumped - Calculating many columns with if statements
    By c0ldy in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-07-2014, 02:36 PM
  6. Replies: 1
    Last Post: 08-25-2013, 09:39 PM
  7. Replies: 1
    Last Post: 04-30-2012, 12:14 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