+ Reply to Thread
Results 1 to 5 of 5

Add brackets if cell colour is grey

  1. #1
    Forum Contributor
    Join Date
    06-13-2008
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    277

    Add brackets if cell colour is grey

    Hi Guys,

    I have a sheet which contains dates and text in a table.

    Some cells have been coloured grey to indicate they are invalid.

    I need a macro which will change any dates in a grey cell from the current date format to a text format within brackets : eg: 17/03/12 would change to (17/03/12) it should leave anything already entered as text as it is.

    The grey fill colour used is RGB: 128, 128, 128 or HSL 170,0,128.

    Any help would be appreciated guys since i can't get my head around this one.

    many thanks

    F

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Add brackets if cell colour is grey

    It would help if you posted a small example workbook with some manually created before and after records.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Contributor
    Join Date
    06-13-2008
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    277

    Re: Add brackets if cell colour is grey

    Andy,

    As always you are a gentleman!

    example attached
    Attached Files Attached Files

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Add brackets if cell colour is grey

    This should do for your sample.

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    06-13-2008
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    277

    Re: Add brackets if cell colour is grey

    Works like a charm Andy!

    Thank you so much!

    You VBA Genius!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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