+ Reply to Thread
Results 1 to 7 of 7

WPS Office: How to call a multi-step formula like a subroutine

  1. #1
    Registered User
    Join Date
    03-23-2017
    Location
    canada
    MS-Off Ver
    365
    Posts
    39

    WPS Office: How to call a multi-step formula like a subroutine

    I have a tax calculation for state and federal that requires several steps and vlookups which would be difficult to code as a single formula.

    Is there a way to call a sheet or a cell within a sheet to perform the steps and return the final value without using VBA?

    Ie: I have a list of various income and want to calculate tax for each one. The income is "passed" to the tax calculation "subroutine" and return the tax calculated result
    year income Calculated tax from steps and formulae below
    1 50000 1200
    2 55000 1250
    3 59000 1290
    .....


    Tax calculation
    step 1
    step 2
    step 3
    ....
    Last edited by martik777; 07-30-2021 at 10:26 PM.

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,803

    Re: How to call a multi-step formula like a subroutine

    If I understand, a data table is one strategy. https://www.excel-easy.com/examples/data-tables.html
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    2,957

    Re: How to call a multi-step formula like a subroutine

    You don't need VBA for this. Please attach a sample workbook.

  4. #4
    Registered User
    Join Date
    03-23-2017
    Location
    canada
    MS-Off Ver
    365
    Posts
    39

    Re: How to call a multi-step formula like a subroutine

    For each income in Column O I need to calculate Total tax using the formulae in B24 - B34
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    2,957

    Re: How to call a multi-step formula like a subroutine

    You can normally use formulas to calculate the Total Tax Payable. But looking at the complicated computations involved, it is easier to use data table as suggested by MrShorty.

    Put the formula: "=C34" into cell P4 > Select the range O4:P12 > Data > What-If Analysis > Data Table > Column input cell: $B$24 > OK.
    Last edited by josephteh; 07-30-2021 at 11:43 PM.

  6. #6
    Registered User
    Join Date
    03-23-2017
    Location
    canada
    MS-Off Ver
    365
    Posts
    39

    Re: How to call a multi-step formula like a subroutine

    Thanks, I can't get it working in WPS office as the what-if functionality is different

  7. #7
    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
    79,398

    Re: How to call a multi-step formula like a subroutine

    Where in your opening post did you say that you were working with WPS Office? Why did you post in the Excel section? I am moving your post.
    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.

+ 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. [SOLVED] call Subroutine
    By mena in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-11-2018, 07:47 AM
  2. Multi-step formula to return increment pay rise
    By Kevy_M in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-23-2013, 10:31 PM
  3. Need help: Macro or multi-step formula needed in place of a pivot-table method.
    By katiedegu in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-21-2013, 10:29 AM
  4. Subroutine sets range.formula to call a function
    By weirdaze in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-14-2012, 06:30 PM
  5. How to call a subroutine in another workbook
    By dgarris in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-04-2008, 10:30 AM
  6. Call subroutine from another workbook
    By DejaVu in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-03-2005, 12:12 PM
  7. subroutine call with arguments
    By gabe in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-11-2005, 06:21 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