+ Reply to Thread
Results 1 to 5 of 5

Looking up lab codes: Returning specific cell value based on combination of TRUE cells

  1. #1
    Registered User
    Join Date
    12-17-2020
    Location
    Maryland
    MS-Off Ver
    360
    Posts
    4

    Question Looking up lab codes: Returning specific cell value based on combination of TRUE cells

    I work in a small medical clinic and manually looking up lab codes is a time sink for my team.

    I'm attempting to make an excel lookup tool for finding the correct lab test code based on the required components. There are several components that can be ordered in any combination and each combination has a specific code. Some component examples are Chemistry, Thyroid Screen, Fecal Analysis, Urinalysis, and UPC Ratio. I'm using linked checkboxes (form controls).

    Example of the functionality I'm aiming for:

    If Chemistry and Thyroid Screen and true, then display code 105.
    If Thyroid Screen and Urinalysis and UPC Ratio are true, then display code 115.

    Honestly, all I have so far are my checkboxes linked to their respective cells and a reference table of components per code. I've been doing some research, youtubing, etc, but I'm stuck staring at the screen just totally unsure where to start with the multiple logic functions

    Workbook example attached.
    Attached Files Attached Files

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Looking up lab codes: Returning specific cell value based on combination of TRUE cells

    Hi there,

    Take a look at the attached version of your workbook and see if it does what you need. It uses the following formula in Cell H9 of worksheet "Sheet2":

    Please Login or Register  to view this content.
    This formula is copied downwards as far as Cell H14.


    Cell B23 of worksheet "Sheet1" contains the following formula:

    Please Login or Register  to view this content.

    It should not be too difficult for you to expand the above logic to cater for additional texts and combinations.


    Hope this helps - please let me know how you get on.

    Regards,

    Greg M
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    12-17-2020
    Location
    Maryland
    MS-Off Ver
    360
    Posts
    4

    Re: Looking up lab codes: Returning specific cell value based on combination of TRUE cells

    What an elegant solution!!! You're a genius, thank you so much. You just made a huge daily headache disappear, a group of grumpy lab techs thanks you

  4. #4
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Looking up lab codes: Returning specific cell value based on combination of TRUE cells

    Hi again,

    Many thanks for your very prompt feedback.

    What more could anyone want than the thanks of a group of grumpy lab techs?!?!?

    You're welcome - glad I was able to help.

    Regards,

    Greg M

  5. #5
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Looking up lab codes: Returning specific cell value based on combination of TRUE cells

    Please try

    =LOOKUP(2,1/(MMULT(--(Sheet2!B9:F14="Yes"),2^ROW(B1:B5))=SUMPRODUCT(Sheet2!B1:B5*2^ROW(B1:B5))),Sheet2!A9:A14)
    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)

Similar Threads

  1. Replies: 4
    Last Post: 01-16-2019, 12:35 PM
  2. [SOLVED] searching combination of 2 cells based on a value of 1 cell
    By k1dr0ck in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-14-2018, 11:10 PM
  3. [SOLVED] Returning a specific value based on one value in a range of cells.
    By stevensimon10482 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 05-03-2017, 08:15 PM
  4. sort all white fill cell on column I based on cell value specific txt if (true)
    By raijinlee in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-01-2017, 01:57 AM
  5. Replies: 10
    Last Post: 01-26-2015, 11:03 AM
  6. Replies: 3
    Last Post: 11-06-2014, 01:00 PM
  7. Enter value in cell based on value combination of two other cells
    By jobell in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-22-2013, 10: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