Closed Thread
Results 1 to 2 of 2

Conditional formatting if cell contains xx

  1. #1
    Registered User
    Join Date
    07-19-2019
    Location
    Holland
    MS-Off Ver
    Office Proffesional Plus 2016
    Posts
    26

    Conditional formatting if cell contains xx

    Hello,

    Could someone give me an example how to code a conditional formatting in VBA?

    A1 B1 G1
    1 2 12


    If G1 contains any of the numers given in A1 and B1, then G1 should turn green, if not, then red.
    I posted a question like this before, but my explanation was way to complicated. I hope someone could help me this time.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,091

    Re: Conditional formatting if cell contains xx

    Administrative Note:

    Unfortunately, this is a duplicate thread, and you are allowed only ONE thread per issue here.

    Please see Forum Rule #5 about thread duplication.

    I am closing this thread, but you may continue here in the original thread.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

Closed 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: 10-04-2016, 05:17 AM
  2. Replies: 2
    Last Post: 12-05-2014, 07:15 AM
  3. Conditional Formatting via VBA: Change formatting in range based on value of each cell
    By ralphjmedia in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-12-2013, 10:37 AM
  4. 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
  5. Replies: 3
    Last Post: 05-15-2012, 04:13 PM
  6. Replies: 1
    Last Post: 03-05-2012, 06:20 PM
  7. Replies: 2
    Last Post: 11-02-2007, 12:03 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