+ Reply to Thread
Results 1 to 5 of 5

Query from other sheet, Conditional Formatting

  1. #1
    Registered User
    Join Date
    10-05-2012
    Location
    Dallas
    MS-Off Ver
    2013
    Posts
    10

    Query from other sheet, Conditional Formatting

    Hello,

    The scenario:
    My company ships hazardous materials. We use a variety of shipping companies (i.e. fedex / ups) who offer a host of service levels (ground, overnight) . Not all of our hazardous products are able to be transported by every shipping service level. To see if a product is able to be transported via a certain shipping service, I have a simple table set up listing each product in rows, and shipping service in columns. When crossed, a green or red cell indicates that this scenario is acceptable, or not acceptable. My list of products is somewhat extensive (~100) with about 20 service levels, and therefore this table is inconvenient to use.

    I would like to have a cell where i enter a product (part#) and a shipping service (3-digit code), a third cell would result with "Compatible" (green fill) or "Not Compatible" (red fill).

    Ideas?

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Query from other sheet, Conditional Formatting

    My idea...a sample file would help. Does not have to be the whole table, but a good representative sample.

    To Attach a File:

    1. Click on Go Advanced
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    10-05-2012
    Location
    Dallas
    MS-Off Ver
    2013
    Posts
    10

    Re: Query from other sheet, Conditional Formatting

    HazMat Conpatibility by Carrier sample.xlsx
    Here is what my sample file looks like so far.

    I would like to have a cell (or two) where i query the item number (ex: 100 series rows) and a shipping service (200 series columns) and have it display whether or not the scenario works.

    In my sample, 101/201 is green. 101/205 is red. If i were to enter 101 and 201 somewhere, it should tell me it works. Or 101 and 205 would say it does not work.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Query from other sheet, Conditional Formatting

    without VBA, if you used 1 or 2...or whatever you want, to show what works, you could use index/match to find what you need. 2007 does not have a function/formula to identify colors (as far as i know)

    for instance, in B19, i entered 105 and in C19, i added 201
    in B20, i used this
    =INDEX($B$2:$P$18,MATCH(B19,A2:A18,0),MATCH(B1:P1,C19,0))
    it gave me 1 for "ok"
    changing B19 to 106 gave me 2 for "not ok"
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    10-05-2012
    Location
    Dallas
    MS-Off Ver
    2013
    Posts
    10

    Re: Query from other sheet, Conditional Formatting

    Excellent!

    But I can only get this to work for tests in column b. If, for example, we change C19 to anything besides 201 (202 or 203), we get #N/A.

  6. #6
    Registered User
    Join Date
    10-05-2012
    Location
    Dallas
    MS-Off Ver
    2013
    Posts
    10

    Re: Query from other sheet, Conditional Formatting

    Edit:

    I changed the formula as follows to test any cell in any column:
    =INDEX($B$2:$P$18,MATCH(B19,A2:A18,0),MATCH(C19,B1:P1,0))

    Thank you very much, this is exactly what I need!

  7. #7
    Registered User
    Join Date
    10-05-2012
    Location
    Dallas
    MS-Off Ver
    2013
    Posts
    10

    Re: Query from other sheet, Conditional Formatting

    Excellent!

    But I can only get this to work for tests in column b. If, for example, we change C19 to anything besides 201 (202 or 203), we get #N/A.

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Query from other sheet, Conditional Formatting

    was your last post a duplicate? if so...

    you'r welcome. If this answered your question, please take a moment to mark the thread as "solved" - it helps keep things neet and tidy lol, and consider adding the reputation to those that helped (see points 2 & 3 below)

+ 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