+ Reply to Thread
Results 1 to 5 of 5

Excel cells coloring

  1. #1
    Registered User
    Join Date
    06-13-2019
    Location
    London
    MS-Off Ver
    2018
    Posts
    20

    Excel cells coloring

    Hey,
    I have a request how to change my macro so that not only cells with the word "Cash" are colored, but all cells containing "Cash" in the text


    Please Login or Register  to view this content.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,865

    Re: Excel cells coloring

    Replace this line

    Please Login or Register  to view this content.
    with

    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Excel cells coloring

    Hi Max

    If you have a lot of data your macro will be slow

    This will color all your errors orange without a loop

    Please Login or Register  to view this content.

    This code will also color all cells with Cash Green

    Please Login or Register  to view this content.
    Last edited by mehmetcik; 05-17-2020 at 04:30 AM.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,376

    Re: Excel cells coloring

    Try (untested):
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,376

    Re: Excel cells coloring

    Why use a macro, why not use Conditional Formatting?

+ 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. Problem coloring cells Excel 2007 vba
    By valgo54 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-03-2013, 11:50 AM
  2. Excel VBA 2007 coloring cells problem
    By valgo54 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-17-2013, 11:59 AM
  3. Coloring cells based on value (Excel 2003)
    By Hawken in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-26-2010, 07:12 AM
  4. Excel 2007 : Coloring the cells and text in Excel 7
    By Dhruva101 in forum Excel General
    Replies: 1
    Last Post: 07-04-2009, 09:17 PM
  5. coloring specific cells using a formula - Excel Mobile
    By cosmicgrooves in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-26-2008, 04:45 AM
  6. [SOLVED] Conditional coloring of Excel cells, based on adjacent cell values?
    By Greg Stuart in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-10-2006, 06:20 PM
  7. Replies: 0
    Last Post: 02-14-2006, 05:55 AM
  8. [SOLVED] No shading or coloring of cells in excel. Is it windowXP setting?
    By Marker123 in forum Excel General
    Replies: 1
    Last Post: 01-23-2006, 01:25 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