+ Reply to Thread
Results 1 to 12 of 12

Choose a formula from a cell and calculate it

  1. #1
    Registered User
    Join Date
    08-28-2022
    Location
    Lisbon, Portugal
    MS-Off Ver
    365
    Posts
    6

    Post Choose a formula from a cell and calculate it

    Hello All!

    This is my first post. Although i am not an expert, i use excel on a daily basis and i ussually am able the solve or find on the web the solutions for the "challenges" i have, but this time i am really stucked. I think that what i want is possible, but not he way i am thinking it.

    So let's see if the comunity can help me.

    The Worksheet represents the sales results and comissions of several employes.

    Each Employe might have an agreed condition of comission, with diferent % by range of sales.

    For Exemple

    Employe (A) has

    0-150 = 35%
    150-200 = 40%
    > 200 = 45%

    Employe (B) has

    0-100 = 32%
    100-200 = 35%
    200-300 = 40%
    >300 = 45%

    This is just a very simplier example, to even know the sales of each there is a bunch of sheets and data that calculates the final % to be applied.

    To Calculate the comissions, when they we're few, i just made get the % with some if's, something like that

    "=IF(P13="EmployeA";IF(T13<65;0,375;IF(T13<85;0,4;IF(T13<105;0,425;IF(T13<125;0,45;IF(T13>125;0,5)))));IF(p13="employeb";(T13<50;0,375;IF(T13<60;0,4;IF(T13<70;0,425;IF(T13<90;0,45;IF(T13>90;0,5)"

    But now there are too many and i am making some rude mistakes on the formules so my idea as to have a sheet where i put

    A | B

    Employe A | IF(T13<85;0,4;IF(T13<105;0,425;IF(T13<125;0,45;IF(T13>125;0,5))))
    Employe B | IF(T13<85;0,44;IF(T13<105;0,43;IF(T13<125;0,49;IF(T13>125;0,59))))

    (I do not insert the "=" so it does not try to calcule)

    Then on the calculation **** i would make a Vlookup to get the percentage for the comission of that Employe on this table above and it calculates.


    I can of course get the formula by Concatenate "=" and vlookup on the calculation sheet and i get the correct complete formula, but... it shows text, does not calcule the result.

    Is there a way for me to setup this conditions ranges per employe and then get the % from the cell that has those ranges to be applied?

    I hope i made clear

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

    Re: Choose a formula from a cell and calculate it

    Welcome to the forum.

    There are instructions at the top of the page explaining how to attach your sample workbook.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    08-28-2022
    Location
    Lisbon, Portugal
    MS-Off Ver
    365
    Posts
    6

    Re: Choose a formula from a cell and calculate it

    Hi. Thanks for the heads up. i will prepare it to attach, current file has to much info. thanks

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

    Re: Choose a formula from a cell and calculate it

    Thanks - I'll watch for it.

  5. #5
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365
    Posts
    3,179

    Re: Choose a formula from a cell and calculate it

    Hi
    I uploaded a sample for you based on your description, hope I understood you correct.

    In sheet1 you need maintain all your manual data per employee
    In sheet 2 use this:

    =LOOKUP(B1,FILTER(Sheet1!$B$1:$B$99,Sheet1!$A$1:$A$99=Sheet2!A1),FILTER(Sheet1!$C$1:$C$99,Sheet1!$A$1:$A$99=Sheet2!A1))
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    08-28-2022
    Location
    Lisbon, Portugal
    MS-Off Ver
    365
    Posts
    6

    Re: Choose a formula from a cell and calculate it

    I think i was able to simplify it enough

    i removed most employes and the other sheets that are not relevant

    In Yellow there are the relevante collumns for the and blue the expected result

    Now lets see if i can attached it well to the message :D
    Attached Files Attached Files

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,186

    Re: Choose a formula from a cell and calculate it

    So what are you trying to do? I don't understand - sorry. You have a perfectly good formula using FILTER.
    Last edited by AliGW; 08-28-2022 at 10:52 AM.

  8. #8
    Registered User
    Join Date
    08-28-2022
    Location
    Lisbon, Portugal
    MS-Off Ver
    365
    Posts
    6

    Re: Choose a formula from a cell and calculate it

    My Formula gives me the formula, the text.

    I want it to give me the result, that gives me make the calculation of the formula and i get the % applied

  9. #9
    Registered User
    Join Date
    08-28-2022
    Location
    Lisbon, Portugal
    MS-Off Ver
    365
    Posts
    6

    Re: Choose a formula from a cell and calculate it

    the collum that is not giving me the info is the yellow - "R"

    the collumn "u" is giving the result but i made it employe by employe

  10. #10
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365
    Posts
    3,179

    Re: Choose a formula from a cell and calculate it

    Hi
    I applied my formula on your sheet, see if that suits your expected results
    In rates tab maintain all employees names , ranges, and corresponding rates

    In 'ResSemanas' R2 :
    =LOOKUP(Q2,FILTER(RATES!$B$1:$B$99,RATES!$A$1:$A$99=ResSemanas!A2),FILTER(RATES!$C$1:$C$99,RATES!$A$1:$A$99=ResSemanas!A2))
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    08-28-2022
    Location
    Lisbon, Portugal
    MS-Off Ver
    365
    Posts
    6

    Re: Choose a formula from a cell and calculate it

    Hello!

    Thank you very Much. I see that the solutions works and i can apply this to my problema!!!

    I still did not understood fully the "filter" formula, but probably it's because it's already late here at my side of the country. i will review it tomorrow

    Really Really Thanks

  12. #12
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365
    Posts
    3,179

    Re: Choose a formula from a cell and calculate it

    You're welcome nspinheiro from beautiful Lisbon

+ 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] Formula: If cell 3 is blank have cell 1 calculate, if cell 3 filled have cell 2 calculate
    By Vicious00013 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-05-2016, 09:34 AM
  2. Choose a Random Cell, Calculate Formula & Round
    By pugsly8422 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-20-2014, 09:59 AM
  3. Replies: 3
    Last Post: 11-29-2013, 10:27 AM
  4. [SOLVED] Formula help to choose lowest cost from multiple vendors and then choose vendor
    By roland_arv in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-27-2013, 07:48 PM
  5. Formula to choose next cell down if text already in cell
    By helcatamy1@yahoo.com in forum Excel General
    Replies: 6
    Last Post: 05-13-2010, 11:02 AM
  6. Formula to choose cell and then cell three rows down
    By mg in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-01-2006, 01:55 PM
  7. Replies: 3
    Last Post: 06-12-2006, 11:30 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