+ Reply to Thread
Results 1 to 11 of 11

Trying to return value based on lookup in table

  1. #1
    Registered User
    Join Date
    05-31-2011
    Location
    Worldwide
    MS-Off Ver
    Excel 2007
    Posts
    5

    Trying to return value based on lookup in table

    It seems Excel has a limit on IF statements within IF statements so I need help with a more elegant solution!

    Here is my problem:

    I am trying to do what I would view as a VLOOKUP however it is looking up multiple values One of those I am looking for in the row labels along the left of the table and the other value I am looking for in the column labels along the top of the table. I am looking to return the value in the table that meets these two values and multiply it by another cell.

    Also the value I am looking up will not be precise i.e. 22.05 however the row labels will be 20, 22.5, 25.. etc.

    Hopefully that makes sense!
    Any help appreciated
    Attached Files Attached Files
    Last edited by jnrexcel; 05-31-2011 at 07:03 AM. Reason: Update title & attach worksheet.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,607

    Re: Vlookup -

    1. Read rules
    2. Change title according to the rules
    3. Upload example workbook

    TY

  3. #3
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Vlookup -

    I reckon a combination of Index and Match should do the trick. Can you post a sample workbook?

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  4. #4
    Registered User
    Join Date
    05-31-2011
    Location
    Worldwide
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Vlookup -

    Sorry, I will change the title etc. now

  5. #5
    Registered User
    Join Date
    05-31-2011
    Location
    Worldwide
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Vlookup -

    Now available for your viewing

  6. #6
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,607

    Re: Trying to return value based on lookup in table

    One more question. What do you mean by closes match?

    For example:

    21 between 20,00% and 22,50% is:
    a) 20,00 because 21 is closer to 20 than 22,5
    b) 22,5 because it's rounded up to higher value

  7. #7
    Registered User
    Join Date
    05-31-2011
    Location
    Worldwide
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Trying to return value based on lookup in table

    Always closest value.
    - 21 goes to 20% as it is closer.
    - 21.9 goes to 22.5% as it is closer
    The only occasion you round up is when it is EXACTLY in the middle.

  8. #8
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,607

    Re: Trying to return value based on lookup in table

    Check this:
    Attached Files Attached Files

  9. #9
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,607

    Re: Trying to return value based on lookup in table

    But for first value, maybe it's easier with this way (without table):

    =L12/L15*L8 for exact value

    =MROUND(L12, 0.025)/L15*L8 for rounded value and your desired result)

  10. #10
    Registered User
    Join Date
    05-31-2011
    Location
    Worldwide
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Trying to return value based on lookup in table

    The 22% and 10% will change hence why I needed the tables to be searched based on what is in those cells.

    Many thanks for the help all!

  11. #11
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,607

    Re: Trying to return value based on lookup in table

    Here, I've made you example...

    Now, depedning of how much you need precise your number I think first value is perfect while 2nd value is within 99% (and it could be 100 but with complicated formula... For smaller Company's ROE difference is bigger)

    I've understood that values will change and that you need to search table... But it can be done without table... Just check red cells.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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