+ Reply to Thread
Results 1 to 7 of 7

Calculating Variable Locality Surtax Up to a Maximum (Table or Long IF-ELSE Stmt)

  1. #1
    Registered User
    Join Date
    10-07-2021
    Location
    US
    MS-Off Ver
    WINDOWS 10 OFFICE 365
    Posts
    4

    Calculating Variable Locality Surtax Up to a Maximum (Table or Long IF-ELSE Stmt)

    We have various localities with varying local surtax amounts collectable on the first 5,000 in sales and I am looking for a good way to have that tax automatically computed based upon both the locality name, it's corresponding tax rate up to the maximum limit if possible. I've a list of the localities, rates and maximum for this surtax to help explain it.
    I have written if statements that handle the situation, say for all sales of 5,000 or less, but it is long and when I add the variable for sales in excess of 5,000 it gets unwieldly. Does anyone know how to use the XLOOKUP or other table LOOKUP function to solve this need? Thank you.

    LocalSurtaxTable.JPG
    Attached Files Attached Files
    Last edited by DIRK13; 10-07-2021 at 10:50 AM. Reason: Add Sample Workbook

  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
    80,719

    Re: Calculating Variable Locality Surtax Up to a Maximum (Table or Long IF-ELSE Stmt)

    Welcome to the forum.

    There are instructions at the top of the page explaining how to attach your sample workbook.
    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
    10-07-2021
    Location
    US
    MS-Off Ver
    WINDOWS 10 OFFICE 365
    Posts
    4

    Re: Calculating Variable Locality Surtax Up to a Maximum (Table or Long IF-ELSE Stmt)

    Thank you for that prompt. I edited my original post and added a simple sample of the worksheet I am attempting to add the capability to.

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,178

    Re: Calculating Variable Locality Surtax Up to a Maximum (Table or Long IF-ELSE Stmt)

    in C27

    =IF(C25>5000,VLOOKUP($A27,$B$41:$D$50,3,FALSE),VLOOKUP($A27,$B$41:$D$50,2,FALSE)*C25)
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  5. #5
    Valued Forum Contributor
    Join Date
    08-31-2007
    Location
    SW Ireland
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2311 Build 16.0.17029.20068) 32-bit
    Posts
    523

    Re: Calculating Variable Locality Surtax Up to a Maximum (Table or Long IF-ELSE Stmt)

    An alternative formula for cell C27:

    =MIN(5000,C25)*VLOOKUP(A27,$B$41:$C$50,2,FALSE)
    Excel 365 user. To unblock a downloaded macro-enabled workbook, go to your "Downloads" folder > right click on the workbook name > click 'Properties' > check the 'Unblock' checkbox. You can now open the workbook.

  6. #6
    Registered User
    Join Date
    10-07-2021
    Location
    US
    MS-Off Ver
    WINDOWS 10 OFFICE 365
    Posts
    4

    Re: Calculating Variable Locality Surtax Up to a Maximum (Table or Long IF-ELSE Stmt)

    Thank you so much. This work perfectly. Very grateful to you John.

  7. #7
    Registered User
    Join Date
    10-07-2021
    Location
    US
    MS-Off Ver
    WINDOWS 10 OFFICE 365
    Posts
    4

    Re: Calculating Variable Locality Surtax Up to a Maximum (Table or Long IF-ELSE Stmt)

    Thank you so much for the alternative method as well. Thank you.

+ 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. Calculating Maximum Drawdown
    By spark.tsang in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-28-2020, 12:06 PM
  2. Calculating Data from a Two Variable Table
    By chris34 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-26-2019, 07:00 PM
  3. [SOLVED] Street and Locality segregation
    By roma83 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-07-2018, 04:54 AM
  4. Find maximum output of a formula as long as another variable is positive
    By stellan76 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-23-2016, 03:50 PM
  5. [SOLVED] Maximum Distance Between Lat/Long Points
    By scorpion419 in forum Excel General
    Replies: 10
    Last Post: 11-13-2012, 04:48 AM
  6. Calculating the maximum run of the same digit
    By giantwolf in forum Excel General
    Replies: 2
    Last Post: 09-01-2010, 05:20 AM
  7. Way to insert a Count Stmt inside an IF stmt without using RC References.
    By TreasureCat in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-14-2007, 01:18 PM

Tags for this Thread

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