+ Reply to Thread
Results 1 to 5 of 5

Conditional formatting across worksheets when looking for specific text

  1. #1
    Registered User
    Join Date
    02-13-2015
    Location
    Brisbane, Australia
    MS-Off Ver
    2016
    Posts
    34

    Conditional formatting across worksheets when looking for specific text

    Hi again!
    I'm hoping to have the following converted into VBA code if possible....

    If
    Sheet 2 column J (dynamic number of rows) contains the same text anywhere on Sheet 1 column J (dynamic number of rows)
    Then
    Fill Sheet 1 column A:G with light green color
    Else
    Fill Sheet 1 column A:G with red color.


    For example, if the text "AID1003" is located anywhere in column J on sheet 2 and in column J on sheet 1, then color the row light green containing "AID1003" on sheet 1.


    Does that make sense?

    If so, thanks for any assistance!!!!!

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,851

    Re: Conditional formatting across worksheets when looking for specific text

    This could be done with conditional formatting and no VBA. Is there a particular reason you want to use VBA?
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    02-13-2015
    Location
    Brisbane, Australia
    MS-Off Ver
    2016
    Posts
    34

    Re: Conditional formatting across worksheets when looking for specific text

    Hi,

    It's part of a longer macro - I'm doing a few cleanup macros first, then some formulas to pull data into Column J on both sheets, then hopefully the above conditional formatting.
    Will put it all under a 'Click Here' button to do all the above in one go.

    Thanks.

  4. #4
    Registered User
    Join Date
    02-13-2015
    Location
    Brisbane, Australia
    MS-Off Ver
    2016
    Posts
    34

    Re: Conditional formatting across worksheets when looking for specific text

    Sorry to bump, but I was hoping somebody could help???

    Perhaps I need to make more sense? I'll try.....

    I have column J with multiple rows (which will differ) on Sheet 1. This column contains various text cells (which will also differ).

    I need to check this column against Sheet 2 column J. The column on Sheet 2 is all over the place, i.e. not in the same order as Sheet 1.

    If there is a match (for example, Sheet 1 Column J Row 12 = "AID1003" matches Sheet 2 Column J Row 47 = "AID1003"), then I need to colour green Columns A:G on Sheet 1 (in this example, colour Row 12).

    If there is no match, colour the row on Sheet 1 red.

    Any ideas???

    Thank you all in advance!

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,851

    Re: Conditional formatting across worksheets when looking for specific text

    I still don't see the need to incorporate this to VBA. I would just create Sheet1 with conditional formatting in the appropriate rows and columns. It sounds like your formatting stays in the same cells all the time. You can do CF in VBA but it's messy and much easier to do it in the worksheet when you don't have to move it around dynamically.

    If this must be in VBA then I would suggest using the macro recorder as a first step.

+ 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. [SOLVED] Conditional Formatting specific text color
    By RJ1969 in forum Excel Programming / VBA / Macros
    Replies: 31
    Last Post: 07-26-2018, 11:16 AM
  2. Add specific text in conditional formatting
    By Dean167 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-26-2016, 02:18 PM
  3. Conditional formatting if comment contains specific text
    By sdecker143 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-14-2015, 04:09 PM
  4. Replies: 2
    Last Post: 04-10-2015, 12:12 PM
  5. Conditional formatting: If A1 is not blank, and B1 does not contain Specific Text
    By shepherdc2814 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-20-2013, 03:32 PM
  6. Conditional Formatting on Specific Text within a Cell
    By leonfox1 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-05-2012, 01:38 PM
  7. Conditional Formatting for specific text
    By Nabnad38 in forum Excel General
    Replies: 5
    Last Post: 05-09-2011, 11:12 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