+ Reply to Thread
Results 1 to 30 of 30

Conditional Formatting

  1. #1
    Forum Contributor
    Join Date
    12-06-2015
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    513

    Conditional Formatting

    Dear Sir

    How can i turn the "Sources data" into black when the data in cell match the "range of cell"

    See attached

    it used =MATCH(A8,$A$8:$D$18,0) but invain , if only single column, it is ok
    What i want to do is , when i select the data whichis the same as in A8:D:, then turn color so that we will not select anymore

    appreciated any help
    Attached Files Attached Files

  2. #2
    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,933

    Re: Conditional Formatting

    Your CF rule is...
    =MATCH($A8,G$8,0)
    you need to expand the range, like in your example above
    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

  3. #3
    Forum Contributor
    Join Date
    12-06-2015
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    513

    Re: Conditional Formatting

    FDibbins

    i think i did not get it right

    See attached

    Only, the 1st cell work
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,202

    Re: Conditional Formatting

    If the selections are ALL in column G:

    =MATCH(A8,$G$8:$G$100,0)

    If selection are in colums G: J

    then created DV with a range for each column
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    12-06-2015
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    513

    Re: Conditional Formatting

    Still not working, i think i did not get the concept right

    I selected the A8:D18, then go to CF, input formula :=MATCH(A8,$G$8:$J$18,0)

    it does not work

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,202

    Re: Conditional Formatting

    Select A8, then use the first formula:

    =MATCH(A8,$G$8:$G$100,0)

    For column H repeat the above but change range to H from G

    Repeat for I and J

  7. #7
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Conditional Formatting

    you can try: =MATCH(A8,G$8:G$18,0)
    but it will work for column
    ie. if Guest 4 has F39 and it will doesn't exist in 4th column from first range but exist in any other - nothing happen, whatever better see attachment
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    12-06-2015
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    513

    Re: Conditional Formatting

    Dear Sandy

    it iit snot working on my side, i am alternatively taken the advice of John.

    However, i wonder if i can do =MATCH(A8,G$8:J$18,0)

    I wonder if i am wrong that it is not possible

    Eric

  9. #9
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Conditional Formatting

    Could you show example what you want to achieve? Without any CF and other things, only manually colored appropriate cells.

  10. #10
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Conditional Formatting

    Or try this one single formula:
    =IFERROR(MATCH(A8,G$8:G$18,0),IFERROR(MATCH(A8,H$8:H$18,0),IFERROR(MATCH(A8,I$8:I$18,0),IFERROR(MATCH(A8,J$8:J$18,0),0))))
    or
    =IFERROR(MATCH(A8,G:G,0),IFERROR(MATCH(A8,H:H,0),IFERROR(MATCH(A8,I:I,0),IFERROR(MATCH(A8,J:J,0),0))))
    Last edited by sandy666; 05-25-2017 at 07:17 AM.

  11. #11
    Forum Contributor
    Join Date
    12-06-2015
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    513

    Re: Conditional Formatting

    Dear Sandy

    Please find attached

    Appreciated in advance
    Attached Files Attached Files

  12. #12
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Conditional Formatting

    So blue on Sheet 2 is correct?

  13. #13
    Forum Contributor
    Join Date
    12-06-2015
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    513

    Re: Conditional Formatting

    Sandy

    Yes

  14. #14
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Conditional Formatting

    and how many guests there will be? 10 or 10.000 ?

  15. #15
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,202

    Re: Conditional Formatting

    Try this as DV rule:

    =COUNTIF($G$11:$J$16,A11)

    Applies to: $A$11:$D$21

  16. #16
    Forum Contributor
    Join Date
    12-06-2015
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    513

    Re: Conditional Formatting

    Sandy

    it will be around 855 persons

  17. #17
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Conditional Formatting

    I think that's all what John did in post #15

  18. #18
    Forum Contributor
    Join Date
    12-06-2015
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    513

    Re: Conditional Formatting

    No idea why, it is not working

  19. #19
    Forum Contributor
    Join Date
    12-06-2015
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    513

    Re: Conditional Formatting

    Sandy

    Yes, i tried John's idea It works if i do that column by column. I wonder if there is a better way

  20. #20
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,202

    Re: Conditional Formatting

    See attached.
    Attached Files Attached Files

  21. #21
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Conditional Formatting

    I extended John's example

    but with many Guests (over 800) you need to prevent for duplicates in conditions range, something like:
    - Select range of conditions
    - DV / Custom / Formula
    =COUNTIF($G$11:$U$21,G11)=1
    (adjust range in formula suitable to your needs)

    (Post edited: check all again)
    Attached Files Attached Files
    Last edited by sandy666; 05-25-2017 at 08:57 AM.

  22. #22
    Forum Contributor
    Join Date
    12-06-2015
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    513

    Re: Conditional Formatting

    Sandy

    thanks and it does serve the purpose,

    So i used a wrong formula =match!

    But in the DV, can i restrrict the duplicated input ! As the seat no is unique, so it can prompt to stop/alert before hand

    How can i do that ?

  23. #23
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Conditional Formatting

    Seats are not unique????? AFAIK they are unique always...
    But if you want...
    Set DV Error Alert Style to Warning
    or
    simply don't use DV for conditions

    else I misunderstood

  24. #24
    Forum Contributor
    Join Date
    12-06-2015
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    513

    Re: Conditional Formatting

    Sandy


    I got it , i amended the DV

    Thanks and really appreciated
    Last edited by Eric Tsang; 05-25-2017 at 09:37 AM.

  25. #25
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Conditional Formatting

    Because I added DV after data was set.
    Try retype D48 in the same cell or any other and you will see
    or
    simply delete all conditions and type yours again

    DV Prevent Duplicates works on USER_Action not for existing values
    Attached Files Attached Files
    Last edited by sandy666; 05-25-2017 at 10:01 AM. Reason: more comments

  26. #26
    Forum Contributor
    Join Date
    12-06-2015
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    513

    Re: Conditional Formatting

    Sandy

    i got some problem with real world.
    No idea why it does not work

    any idea on the DV part.. =COUNTIF($H$2:$M$11,H2)=1

    Appreciated your help
    Attached Files Attached Files

  27. #27
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Conditional Formatting

    Post #21
    1. Select range !!!
    2. Data
    3. Data Validation
    4. Allow: Custom
    5. Formula: =COUNTIF($H$2:$M$11,H2)=1
    6. OK
    You got a problem because you set formula: =COUNTIF($H$2:$M$11,H2)=1 for H2 only not for range H2:M11 so it doesn't work.

    You can't use formula like you did in column H because, like I said in post #25,
    DV Prevent Duplicates works on USER_Action not for existing values
    DV works with data manually entered not copy/paste or with formula
    Last edited by sandy666; 05-25-2017 at 11:03 PM.

  28. #28
    Forum Contributor
    Join Date
    12-06-2015
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    513

    Re: Conditional Formatting

    Sandy

    thanks and i found an interesting finding, after i set the DV

    The H2 column and I3 column same valid, it does not prompt. I copy the H2 value to I3 column, it does not prompt too. For Example, if i have F35 in H2 (that is a value create by Match fucntion, it does not alert the DV, and i copy the cell and paste value only to I2, it also does not work

    Is that anything that i missed ?

  29. #29
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Conditional Formatting

    Did you read post #27 ?
    I think you should read again

  30. #30
    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,933

    Re: Conditional Formatting

    DV will not work on copied data, no matter how it was copied

+ 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: 1
    Last Post: 12-08-2016, 03:14 PM
  2. Conditional Formatting Removing Previous Conditional Formatting?
    By CravingGod in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-04-2016, 01:02 PM
  3. Replies: 6
    Last Post: 01-08-2016, 06:44 PM
  4. Opening xlsm files with conditional formatting opens with removed conditional formatting
    By Martijn.Steenbakker in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-07-2014, 05:38 AM
  5. Replies: 1
    Last Post: 09-20-2013, 06:23 PM
  6. Delete Conditional Formatting conditions but keep cell formatting - Excel 2010
    By tetreama in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-09-2012, 08:28 PM
  7. Replies: 3
    Last Post: 05-15-2012, 04:13 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