+ Reply to Thread
Results 1 to 12 of 12

Combining index and hlookup?

  1. #1
    Registered User
    Join Date
    04-17-2009
    Location
    Pacific Northwest
    MS-Off Ver
    Excel 2011
    Posts
    30

    Combining index and hlookup?

    I have created and named a table with salaries based on years of experience and education.

    I am having trouble writing a function to search for a specific amount and result in the the cell below that specific amount.

    So people are moving up by one year on the schedule I would like to use their current salary to lookup and display their salary for next year.

    I am confused on how to incorporate the different functions I am assuming an index and a hlookup...

    any help would be greatly appreciate

    I have attached a sample worksheet

    Thanks again
    Attached Files Attached Files
    Last edited by thisiscrazy; 04-21-2009 at 12:49 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Combining index and hlookup?

    So where exactly is the number going to come from? What should populate in C5 and based on what?
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    04-17-2009
    Location
    Pacific Northwest
    MS-Off Ver
    Excel 2011
    Posts
    30

    Re: Combining index and hlookup?

    Oh, I am sorry.

    Based on the table built in the 'Salary Scale' worksheet.
    I named the data range Salary.

    Find the current salary which is listed in the wage column and populate the salary below that wage which would be an increase for an additional year of service.

    Thank you for such a quick response.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Combining index and hlookup?

    Try:

    Please Login or Register  to view this content.
    copied down

  5. #5
    Registered User
    Join Date
    04-17-2009
    Location
    Pacific Northwest
    MS-Off Ver
    Excel 2011
    Posts
    30

    Re: Combining index and hlookup?

    I receive a #Value error....

    That was my fault the table had spaces in each cell. After I converted all of the cells to numbers a value was given.

    Unfortunately it gave the same value for each salary.

    I have attached an updated file

    Thanks again
    Attached Files Attached Files
    Last edited by thisiscrazy; 04-20-2009 at 05:48 PM.

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Combining index and hlookup?

    You seem to have pasted the same formula in all the cells instead of just copying it down from the first cell.. the references will then get updated.

    See attached.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    04-17-2009
    Location
    Pacific Northwest
    MS-Off Ver
    Excel 2011
    Posts
    30

    Re: Combining index and hlookup?

    Very foolish of me.

  8. #8
    Registered User
    Join Date
    04-17-2009
    Location
    Pacific Northwest
    MS-Off Ver
    Excel 2011
    Posts
    30

    Re: Combining index and hlookup?

    It works for C5 but the remaining cells have decreases instead of increases.
    Sorry for all of the confusion.

  9. #9
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Combining index and hlookup?

    My mistake... forgot to make 'Salary scale'!C5 absolute:

    Try in C5, copied down:

    Please Login or Register  to view this content.
    but this will give a blank or REF error if the lookup value is the last value in the column... ie there is no "next largest" salary... what do you want returned in that case, the lookup salary?

    If so, then try:
    Please Login or Register  to view this content.
    Last edited by NBVC; 04-21-2009 at 11:39 AM.

  10. #10
    Registered User
    Join Date
    04-17-2009
    Location
    Pacific Northwest
    MS-Off Ver
    Excel 2011
    Posts
    30

    Re: Combining index and hlookup?

    That is indeed what I wanted returned if there was no next step.
    That worked perfectly!
    Thank you very much.
    I am shocked that the function is so seemingly complex and long. I hope to eventually learn enough to actually contribute.

    When I found this forum I thought that "this is crazy" all of this information and guidance available. Hence the name.

    Thanks again!

  11. #11
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Combining index and hlookup?

    Another Alternate formula:

    Maybe shorter and more efficient... but just as complex

    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    04-17-2009
    Location
    Pacific Northwest
    MS-Off Ver
    Excel 2011
    Posts
    30

    Re: Combining index and hlookup?

    NBVC,

    Thanks for all of the help, I threw the newer formula in and it also works like a charm.

+ 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