+ Reply to Thread
Results 1 to 5 of 5

INDEX formula shading user error

  1. #1
    Registered User
    Join Date
    08-04-2021
    Location
    Victoria, Australia
    MS-Off Ver
    Office Professional 2019
    Posts
    8

    INDEX formula shading user error

    Hi Excel Gurus

    I am having issues with my index formula for a risk register. I am certain this is a user error, but I cannot see it for looking.

    There are two parts to my problem

    In my spreadsheet, columns H and I have a list of 5 data validation/variables each and I wish them to populate row J with the risk rating from the table from rows 40 to 45 dependent on what has been selected from the pull down options in rows H and I. I have changed all the outcome risk ratings to reflect the alphabet so that I could try and solve my issue but I keep going in circles. As I am getting an answer, just not the correct one.

    Secondly, is there a way to get column J to also pick up the colour (shading) along with the risk rating? I have previously used conditional formatting but the risk rating table that I have been asked to use has both H & M in yellow, M & L in Green and H & E in red. Is this possible? I have placed the actual risk rating table in the document as well.

    Any assistance would be greatly appreciated.

    Kind regards

    Kate
    Attached Files Attached Files
    Last edited by KateJ; 08-24-2021 at 12:32 AM.

  2. #2
    Forum Expert
    Join Date
    09-30-2019
    Location
    Chiangmai, Thailand
    MS-Off Ver
    Office 2016, Excel 2019
    Posts
    1,234

    Re: INDEX formula shading user error

    Please try.

    From J4
    =INDEX(G41:K45,MATCH(H4,G40:K40,0),MATCH(I4,F41:F45,0))

    To
    =INDEX($G$41:$K$45,MATCH(I4,$F$41:$F$45,0),MATCH(H4,$G$40:$K$40,0))


    Edit.
    I've got confuse , which table you want to use ?
    Row 40-45 or 51-56
    because it will effect the solution for condition format.

    for 40-45 , you may create a list of table for each shading and use countif to choose color.
    but for 51-56 you need to re-verify the index value to choose color.


    Regards.
    Last edited by menem; 08-23-2021 at 11:49 PM.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: INDEX formula shading user error

    Try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Code the matrix cells with g, y and with the font formatted the same as the fill colour. Then use CF formulae to colour the cells. For example =J4="r" formatted as red.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    08-04-2021
    Location
    Victoria, Australia
    MS-Off Ver
    Office Professional 2019
    Posts
    8

    Re: INDEX formula shading user error

    Hi

    Thank you for your answer. I had my formula in the incorrect order. I am still working on my shading issue.

    Kind regards

    Kate

  5. #5
    Registered User
    Join Date
    08-04-2021
    Location
    Victoria, Australia
    MS-Off Ver
    Office Professional 2019
    Posts
    8

    Re: INDEX formula shading user error

    Hi TMS

    Thank you for your assistance with my issues. It appears that I put my formula in the incorrect order. I am still uncertain how to get the correct colour from the information. I do not wish to shade J4 a particular colour. I want it to pull the colour from the matrix table below depending on what answer comes up from the H & I column variables. Does this make sense? The actual contents of the data was the L M H E information. I replaced the actual table with the alphabet to try to work out what I was doing incorrectly. The issues still remains that there is both L or M in green and M or H in yellow and H or E in Red. I am not sure how to resolve this.

    Kind regards

    Kate

+ 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: 3
    Last Post: 12-21-2020, 05:17 PM
  2. [SOLVED] Index, Match formula returns #NA error if result is from an average formula.
    By billrogers184 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-28-2016, 11:43 AM
  3. Replies: 3
    Last Post: 05-02-2013, 01:31 AM
  4. [SOLVED] Trying to get dynamic shading, removing shading if conditions are met.
    By Jonfletch in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-18-2013, 07:55 PM
  5. Odd Background shading behavior And Error Checking
    By dcgrove in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-11-2008, 11:08 PM
  6. [SOLVED] Conditional Cell Shading (based on the shading of other cells)
    By Tubby in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-20-2006, 05:10 PM
  7. [SOLVED] shading a rowwhen a time is entered but no shading when 0 is enter
    By fomula problems in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-23-2005, 04:05 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