+ Reply to Thread
Results 1 to 4 of 4

Sorting data populated with an HLOOKUP

  1. #1
    Registered User
    Join Date
    03-17-2011
    Location
    Atlanta
    MS-Off Ver
    Excel for Office 365
    Posts
    38

    Question Sorting data populated with an HLOOKUP

    I have a rather large set of data that has certain values populated by HLOOKUPS. I need to be able to sort the overall data set and have the HLOOKUP rows remain intact. I will explain this below with an example of what I am trying to do.

    I am working on a physician database which is currently sorted by specialty. For each physician row, there is an HLOOKUP that is benchmarking a value on the (current) Summary sheet to another worksheet (Benchmark Summary). Here is the formula: =HLOOKUP(S8/O8,'Benchmark Summary'!$C8:$CG$251,'Benchmark Summary'!$A8,1)

    The formula works great as long as the Summary worksheet is not sorted in any other manner. The Benchmark Summary sheet, where the HLOOKUP is matching the specialty name, is populated by the Summary sheet. So, in the above formula, I am benchmarking the specialty of Emergency Medicine. Column B in Benchmark Summary is populated with Emergency Medicine in the same row (row 8). This then works on many other sheets to pull in data specific to that specialty in the Benchmark Summary C8:CG251. If I were to then change the specialty to Family Medicine on the Summary sheet, then Benchmark Summary B8 would also change to Family Medicine, and pull in the appropriate benchmarks. (Bear with me, the problem comes in a few moments.)

    The problem becomes that the row indicators within the formula do not change if I resort the data, but the specialties will change. So if I resort, and the above example goes from Row 8 to Row 22 to function retains the original anchor to Row 8. The issue is that the specialty in Row 8 is no longer Emergency Medicine, and the formula still points to row 8 instead of updating to row 22. Again, the formula follows: =HLOOKUP(S22/O22,'Benchmark Summary'!$C8:$CG$251,'Benchmark Summary'!$A8,1)

    Any thoughts on how to unanchor the formula (NOTE: there is not an absolute reference ($) attached to the rows of the red numbers, just the columns)? I think Excel is trying to help me by retaining the original designation, but in fact I need it to do the opposite and update the above red numbers to row 22.

  2. #2
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Sorting data populated with an HLOOKUP

    Hello Can you please upload a sample book!
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    WANT TO SAY THANKS, HIT ADD REPUTATION (*) AT THE BOTTOM LEFT CORNER OF THE POST

    More we learn about excel, more it shows us, how less we know about it.

    for chemistry
    https://www.youtube.com/c/chemistrybyshivaansh

  3. #3
    Registered User
    Join Date
    03-17-2011
    Location
    Atlanta
    MS-Off Ver
    Excel for Office 365
    Posts
    38

    Re: Sorting data populated with an HLOOKUP

    There is a lot of information in it that I cannot legally disclose. I'll work on a smaller, blinded set of data, but in the meantime any suggestions or questions you may have would be much appreciated!

  4. #4
    Registered User
    Join Date
    03-17-2011
    Location
    Atlanta
    MS-Off Ver
    Excel for Office 365
    Posts
    38

    Re: Sorting data populated with an HLOOKUP

    Alright all, I have attached a section of the workbook I am working on with blinded data. Again, the problem is within the HLOOKUP, so when it is sorted by MGMA Specialty, that is the original order with no issues. When you sort by Comp Data, then you'll notice that the rows the HLOOKUP are referencing are out of sync.

    Test.xlsx

+ 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. Replies: 12
    Last Post: 01-28-2014, 12:36 PM
  2. Replies: 4
    Last Post: 04-04-2013, 11:57 PM
  3. Replies: 6
    Last Post: 10-21-2010, 03:39 AM
  4. Sorting a table which is populated via formulas
    By Benson112 in forum Excel General
    Replies: 1
    Last Post: 03-24-2008, 12:29 PM
  5. Sorting on cells containing HLOOKUP
    By SueD in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 11-15-2005, 06:40 AM

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