+ Reply to Thread
Results 1 to 23 of 23

Formula with to select a percentage from a table

  1. #1
    Registered User
    Join Date
    03-11-2021
    Location
    Lisbon
    MS-Off Ver
    365
    Posts
    13

    Formula with to select a percentage from a table

    Hello Guys,

    I need to select a percentage from a table / Values based on a cell.
    1st i need to get the Region % and then the Manager % so i can get the value to apply.

    help.JPG

    Edit Can seem to attach the file
    Edit2: Attached the file!
    Edit 3: solved

    Thanks in advance.
    Attached Files Attached Files
    Last edited by MigueX; 04-09-2021 at 10:42 AM. Reason: SOLVED

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,882

    Re: Formula with to select a percentage from a table

    Hi and welcome to the forum

    Pictures are of little value. Honestly, no one wants to re-type your data to try and solve your issue. Additionally, we would only be guessing at how your data was structured, ie. formulas, formatting, etc. Additionally, due to how some browsers behave, many of our members cannot see uploaded pictures/images. Please do not take this route.

    Please attach a sample file that represents what you have. The structure of your attachment should be the same structure as your actual data. Any proprietary information should be changed.

    Include in the attachment any code you're currently using (whether it works or not) and an "After" of what you wish the output to be.

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

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

    Re: Formula with to select a percentage from a table

    It looks like it should be a relatively simple 2D lookup formula. Are you familiar with the INDEX() [https://support.office.com/en-us/art...2-b56b061328bd ] and MATCH() [https://support.microsoft.com/en-us/...rs=en-us&ad=us ] functions?

    1) Are you required to use those text strings in A4:A7 and B3:E3? Could you replace those with numbers? I would start by replacing those text strings with suitable numbers. A4 would be -1, A5 would be -0.05, A6 would be 0, A7 would be 0.05. Same values in B3:E3.
    2) To find the row # based on a %region value, use a MATCH() function. MATCH(B11,$A$4:$A$7,1). Note the mix of relative and absolute references and also note the use of 1 in the 3rd argument telling Excel to use an approximate match lookup algorithm (see help file).
    3) Use a similar MATCH() function for the column #. MATCH(C11,$B$3:$E$3,1)
    4) Use an INDEX() function to return the corresponding value from the main body of the lookup table. =INDEX($B$4:$E$7,MATCH(B11,...),MATCH(C11,...))

    Would something like that work for you?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

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

    Re: Formula with to select a percentage from a table

    Testing in your sample file, and I observe that you have preformatted all of your cells as text, which means you cannot enter formulas and any number entries convert to text. You will need to change this and reenter numbers so that you can enter numbers and formula into cells. If there is some outside reason that you are required to work with text rather than numbers, please explain so that solutions can take that requirement into account.

  5. #5
    Registered User
    Join Date
    03-11-2021
    Location
    Lisbon
    MS-Off Ver
    365
    Posts
    13

    Re: Formula with to select a percentage from a table

    Hello MrShorty,

    I uploaded the file with the values in %.
    i dont need them to be in text, only need to get the values

    Tx!

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

    Re: Formula with to select a percentage from a table

    I won't have access to Excel until tomorrow. Have you tried my suggestion above?

  7. #7
    Registered User
    Join Date
    03-11-2021
    Location
    Lisbon
    MS-Off Ver
    365
    Posts
    13

    Re: Formula with to select a percentage from a table

    Hello,

    Tried your suggestion but cant seem to make it work

    i attached the file on this reply.
    Attached Files Attached Files

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

    Re: Formula with to select a percentage from a table

    You failed to follow Mr Shorty's very clear instructions and only created one MATCH function - you need two, as this is a 2D lookup.

    Try this:

    =INDEX($B$4:$E$7,MATCH(B11,$A$4:$A$7,1),MATCH(C11,$B$3:$E$3,1))

    You may need semi-colons in place of the commas for your Portuguese locale.
    Last edited by AliGW; 04-09-2021 at 05:23 AM.
    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.

  9. #9
    Registered User
    Join Date
    03-11-2021
    Location
    Lisbon
    MS-Off Ver
    365
    Posts
    13

    Re: Formula with to select a percentage from a table

    Cool,

    That worked!

    Gonna test it more then going to give feedback!!

    Thanks alot

    Edit:
    Last edited by AliGW; 04-09-2021 at 05:29 AM. Reason: PLEASE don't quote unnecessarily!

  10. #10
    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,780

    Re: Formula with to select a percentage from a table

    No, the formula I gave you finds a cross reference point: the first MATCH looks down the region axis, and the second MATCH looks along the managers axis. The INDEX section then finds cell D6 at the intersection and returns 0.075 (8%).

    Excel 2016 (Windows) 32 bit
    A
    B
    C
    D
    E
    1
    2
    Region %
    Managers %
    3
    -1%
    -0.05%
    0%
    6%
    4
    -1%
    0%
    -10%
    0%
    0%
    5
    -0.05%
    -15%
    -5%
    5%
    3%
    6
    0%
    -10%
    0%
    8%
    10%
    7
    6%
    -5%
    0%
    10%
    20%
    8
    9
    10
    Name
    % Region
    % Managers
    Aplyed %
    11
    Name 1
    5%
    1%
    8%
    12
    Name 2
    10%
    5%
    10%
    13
    Name 3
    -10%
    11%
    #N/A
    Sheet: Sheet1

    Excel 2016 (Windows) 32 bit
    D
    11
    =INDEX($B$4:$E$7,MATCH(B11,$A$4:$A$7,1),MATCH(C11,$B$3:$E$3,1))
    Sheet: Sheet1
    Last edited by AliGW; 04-09-2021 at 05:33 AM.

  11. #11
    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,780

    Re: Formula with to select a percentage from a table

    Quote Originally Posted by MigueX View Post
    Cool,

    That worked!
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  12. #12
    Registered User
    Join Date
    03-11-2021
    Location
    Lisbon
    MS-Off Ver
    365
    Posts
    13

    Re: Formula with to select a percentage from a table

    Hey,

    Why the negative numbers like -10% are getting a error?
    All the -1 number have to be treated the same way.
    Should i add more number in the table?

  13. #13
    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,780

    Re: Formula with to select a percentage from a table

    Change the boundaries, e.g.

    Excel 2016 (Windows) 32 bit
    A
    B
    C
    D
    E
    1
    2
    Region %
    Managers %
    3
    -100%
    -0.05%
    0%
    6%
    4
    -100%
    0%
    -10%
    0%
    0%
    5
    -0.05%
    -15%
    -5%
    5%
    3%
    6
    0%
    -10%
    0%
    8%
    10%
    7
    6%
    -5%
    0%
    10%
    20%
    Sheet: Sheet1
    Last edited by AliGW; 04-09-2021 at 05:53 AM.

  14. #14
    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,193

    Re: Formula with to select a percentage from a table

    I think your 1% should 10% and 0.05% should be 5%

  15. #15
    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,780

    Re: Formula with to select a percentage from a table

    Not sure I agree, John - they are negatives for sure (look at the results table - final row criteria).

  16. #16
    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,193

    Re: Formula with to select a percentage from a table

    Look at original post. 0.05 (in the table) is the numeric equivalent of 5% so i think Numbers vs % are mixed.

  17. #17
    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,780

    Re: Formula with to select a percentage from a table

    Sorry - where do you see 0.05 in the original post? I see less than minus 5%.

  18. #18
    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,193

    Re: Formula with to select a percentage from a table

    I don't see 0.05 - it is 5% but row 5 in your (OP's) table has -0.05% not 5%.
    Last edited by AliGW; 04-09-2021 at 06:27 AM.

  19. #19
    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,780

    Re: Formula with to select a percentage from a table

    Ah, yes! Should be -5% (or even -6%).

  20. #20
    Registered User
    Join Date
    03-11-2021
    Location
    Lisbon
    MS-Off Ver
    365
    Posts
    13

    Re: Formula with to select a percentage from a table

    Thanks for the reply's!

    1st image is the original table
    Even if i extend the table to -8% all values bellow -8 return error.
    Positive number all work good pass the >5%
    Attached Images Attached Images

  21. #21
    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,780

    Re: Formula with to select a percentage from a table

    Even if i extend the table to -8% all values bellow -8 return error.
    Your first entry needs to be LOWER than the lowest possible value you'd want to look up, so if your lowest value to look up is -90, you need to start with -90. Anything lower will return an error.

  22. #22
    Registered User
    Join Date
    03-11-2021
    Location
    Lisbon
    MS-Off Ver
    365
    Posts
    13

    Re: Formula with to select a percentage from a table

    It worked like a charm!

    thanks alot for all your help


  23. #23
    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,780

    Re: Formula with to select a percentage from a table

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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. If formula for a paid percentage of the size of a job on a sliding table
    By jess1972 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-06-2020, 03:39 AM
  2. [SOLVED] Formula for percentage Increase and corresponding percentage decrease (and viceversa)
    By jcroque89 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-06-2015, 10:25 AM
  3. Percentage Formula Wrong and Pivot Table
    By hokkaido19 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-16-2015, 11:41 PM
  4. Creating a formula to select a value in a table based on a criteria
    By davidnyke in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-03-2014, 10:07 AM
  5. Replies: 7
    Last Post: 06-21-2014, 06:01 PM
  6. Replies: 7
    Last Post: 07-13-2012, 10:26 AM
  7. Applying a percentage formula to a Pivot Table
    By daveouch in forum Excel General
    Replies: 0
    Last Post: 10-14-2009, 11:37 AM

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