+ Reply to Thread
Results 1 to 4 of 4

Find a value and check it matches and compare

  1. #1
    Forum Contributor
    Join Date
    09-25-2011
    Location
    Lenasia, Johannesburg,South Africa
    MS-Off Ver
    Excel 2019
    Posts
    269

    Find a value and check it matches and compare

    Greetings

    I am working on a little project

    I need help with structuring a formula that will look a value in D4 and compare it to a value in H4

    We need to look up the value from D4 in the table in column O and see in line between P to T if the second value can be found. If it is found, need to shaded the cell h4 Green if not shade the cell h4 Red.

    We then do the same for D5, D6 and D7

    The value in D and H can change each time we run the utility


    I thank you for all the help

    Kind regards

    Vraj
    Attached Files Attached Files
    Last edited by khanaran; 10-12-2018 at 01:26 AM. Reason: make my request a little clearer

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,705

    Re: Numero match and shade

    So, you want H5 to appear on ALL the rows of columns P to S where the numbers in D4:D7 match with cells in column O, and only then will H5 be green - otherwise it will be red.

    Is that correct?

    Pete

  3. #3
    Forum Contributor
    Join Date
    09-25-2011
    Location
    Lenasia, Johannesburg,South Africa
    MS-Off Ver
    Excel 2019
    Posts
    269

    Re: Numero match and shade

    Hi

    So sorry I did not make myself clear and realise that I caused a confusion

    O2 to s 11 will be the lookup table

    It should I think easier to read if I had stated that we look at D4 and check in the table in O if it matches the value in H5. if it does then we should shade K4 as Green if no match then shade K4 red.

    Likewise for D5 check if the value has a match in the table O and if the corresponding columns contain the value that matches H5 and then K5 will be shaded Green if not Red

    we do the same for d6 and D7

    I trust that may be what I was initially looking for

    The value in D4 and H5 can change

    Kind regards

    Vraj
    Last edited by khanaran; 10-11-2018 at 02:36 PM.

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,535

    Re: Find a value and check it matches and compare

    See if this will help.
    1) Paste the following formula into cell K4 and drag down to K7: =SUMPRODUCT((O$3:O$11=D4)*(P$3:S$11=H$5))
    2) Select cells K4:K7
    3) Select conditional formatting and use the following as rules
    For Red (font and fill): =K4=0
    For Green(font and fill): =K4=1
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. Match a value and check if it appears within a table and shade if it appears
    By khanaran in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-20-2017, 10:19 AM
  2. Replies: 2
    Last Post: 04-03-2012, 08:51 AM
  3. Replies: 1
    Last Post: 01-27-2006, 06:15 PM
  4. Cambiando el Número Predeterminado de Hojas en un Nuevo Libro
    By ExcelTip in forum Tips and Tutorials
    Replies: 0
    Last Post: 11-28-2005, 09:55 AM
  5. Cambiar el Formato de la Celda de Fecha a Número
    By ExcelTip in forum Tips and Tutorials
    Replies: 0
    Last Post: 11-28-2005, 06:54 AM
  6. celda con numero IP
    By Gilberto in forum Excel General
    Replies: 1
    Last Post: 11-02-2005, 06:17 PM
  7. Cambiar de numero a letra.
    By japerezestebaran in forum Excel General
    Replies: 1
    Last Post: 10-31-2005, 06:05 AM

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