+ Reply to Thread
Results 1 to 10 of 10

Lookup result with 2 variables and copy the result formatting

  1. #1
    Registered User
    Join Date
    07-16-2017
    Location
    Dammam
    MS-Off Ver
    Office 365
    Posts
    10

    Lookup result with 2 variables and copy the result formatting

    I have category A to R going from 1 to 180 days with different results per category.
    How do I get the result based on 2 variables, category and days.
    The formatting should also be the same for each result.
    Please refer to the attached file for details.

    Thanks in advance.
    Attached Files Attached Files
    Last edited by hazeljohn19; 12-08-2020 at 07:17 AM.

  2. #2
    Valued Forum Contributor PeteABC123's Avatar
    Join Date
    09-21-2012
    Location
    Chicago, IL
    MS-Off Ver
    MS Office 365 ver 2202
    Posts
    1,104

    Re: Lookup result with 2 variables and copy the result formatting

    Use CF and it works fine.Attachment 707807

    Give it a go. Copy down.
    Pete

  3. #3
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,822

    Re: Lookup result with 2 variables and copy the result formatting

    Try this in C2 and copy down:
    =INDEX($F$2:$K$19,XMATCH(A2,$E$2:$E$19,0),XMATCH(B2,$F$1:$K$1,1))

    The attached has Conditional formatting applied to match the formatting of the grid.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    07-16-2017
    Location
    Dammam
    MS-Off Ver
    Office 365
    Posts
    10

    Re: Lookup result with 2 variables and copy the result formatting

    Thank you. This worked perfectly. (for my office 365).
    Just a note, the formula only works on office 365 and will not work on previous versions of excel.

  5. #5
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,822

    Re: Lookup result with 2 variables and copy the result formatting

    Yes, that's because of the XMATCH was used and I saw you were using O365. Could make it work with just Match, but you'd have to make sure everything was sorted properly.

  6. #6
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Taiwan
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,378

    Re: Lookup result with 2 variables and copy the result formatting

    Try C2 cell , Array formula, For previous versions of excel

    HTML Code: 

  7. #7
    Registered User
    Join Date
    07-16-2017
    Location
    Dammam
    MS-Off Ver
    Office 365
    Posts
    10

    Re: Lookup result with 2 variables and copy the result formatting

    I tried to run the formula but it don't seem to work on some cells. e.g. row 8: Category is A & Days is 161. Result should be 4 but instead it's showing 3. I have already arranged the category from smallest to largest.
    Attached Files Attached Files

  8. #8
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Taiwan
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,378

    Re: Lookup result with 2 variables and copy the result formatting

    try C2 cell formula , drag down

    HTML Code: 

  9. #9
    Registered User
    Join Date
    07-16-2017
    Location
    Dammam
    MS-Off Ver
    Office 365
    Posts
    10

    Re: Lookup result with 2 variables and copy the result formatting

    This worked well. Thanks.

  10. #10
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Taiwan
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,378

    Re: Lookup result with 2 variables and copy the result formatting

    You're Welcome. Thank You for the feedback

+ 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. Copy color from conditional formatting result
    By Did13n in forum Outlook Formatting & Functions
    Replies: 7
    Last Post: 06-28-2016, 01:12 AM
  2. Replies: 4
    Last Post: 12-31-2015, 04:32 AM
  3. Replies: 7
    Last Post: 11-27-2015, 11:12 AM
  4. 2 variables to create result
    By subtilty in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-10-2010, 07:52 AM
  5. How can I copy the formula result formatting?
    By M Neff in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-11-2010, 05:11 PM
  6. [SOLVED] TWO VARIABLES - ONE RESULT
    By HERNAN in forum Excel General
    Replies: 3
    Last Post: 08-16-2006, 05:40 PM
  7. showing lookup result with multiple variables
    By jprice in forum Excel General
    Replies: 2
    Last Post: 07-11-2006, 07:55 PM

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