+ Reply to Thread
Results 1 to 5 of 5

Vba to color cells that contains non capitalized letters (help a newbie)

  1. #1
    Forum Contributor
    Join Date
    01-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365
    Posts
    263

    Vba to color cells that contains non capitalized letters (help a newbie)

    Good Night,

    Could someone help me out with a code?

    I need to color all cells in 3 columns (E, H, J) that contains at least 1 lowercase letter within, using a RGB color code.

    Extra: I'd be even better if at the same time I could change the cell color if the text is fully uppercase (every single letter)

    For the entries that contain lowercases I'd use RGB(255, 204, 153), as for the fully uppercase RGB(198, 239, 206)

    SOS

    Pedro.
    Last edited by therealdees; 02-26-2021 at 08:17 PM.

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

    Re: Vba to color cells that contains non capitalized letters (help a newbie)

    It is not necessary to use VBA for this. I would recommend conditional formatting.

    Select columns E, H, and J

    With the columns still selected create conditional formatting rule
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and apply fill using RGB(255,204,153)

    With the columns still selected create another rule:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Set fill color for cells to RGB(198,239,206)

    Sample attached.
    Attached Files Attached Files
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Spammer
    Join Date
    10-23-2012
    Location
    Adelaide, Australia
    MS-Off Ver
    Excel 2003, Office 365
    Posts
    1,237

    Re: Vba to color cells that contains non capitalized letters (help a newbie)

    If you want VBA though...

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    01-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365
    Posts
    263

    Re: Vba to color cells that contains non capitalized letters (help a newbie)

    Quote Originally Posted by Croweater View Post
    If you want VBA though...

    Please Login or Register  to view this content.
    Worked like a charm!!! Thank you so much

    I started trying to create some codes, but I'm still very noob. This will help me a lot with my work and save me lots of time!! s2
    Pedro.

  5. #5
    Forum Contributor
    Join Date
    01-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365
    Posts
    263

    Re: Vba to color cells that contains non capitalized letters (help a newbie)

    Quote Originally Posted by 6StringJazzer View Post
    It is not necessary to use VBA for this. I would recommend conditional formatting.

    Select columns E, H, and J

    With the columns still selected create conditional formatting rule
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and apply fill using RGB(255,204,153)

    With the columns still selected create another rule:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Set fill color for cells to RGB(198,239,206)

    Sample attached.
    Although its a good idea which I stupidly didn't thought of, VBA would suit me better as I plan to run multiples codes, maybe with button in the close future

    Thanks for the reply anyway, this could be useful for me in other stuff!

+ 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. Word 2010 - Word Makes First Letters Of First Words Capitalized
    By zanshin777 in forum Word Formatting & General
    Replies: 0
    Last Post: 09-10-2019, 05:35 PM
  2. How to display a word with first two letters capitalized
    By livemusic in forum Excel General
    Replies: 5
    Last Post: 08-26-2015, 10:23 AM
  3. Replies: 2
    Last Post: 07-30-2015, 12:20 PM
  4. Replies: 4
    Last Post: 06-17-2014, 04:49 PM
  5. [SOLVED] Can't type two adjacent letters capitalized
    By livemusic in forum Excel General
    Replies: 3
    Last Post: 10-27-2012, 05:04 PM
  6. Need to capitalized letters in spreadsheet
    By phildoc in forum Excel General
    Replies: 3
    Last Post: 12-01-2011, 05:31 PM
  7. Replies: 2
    Last Post: 10-05-2005, 06:05 PM

Tags for this Thread

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