+ Reply to Thread
Results 1 to 5 of 5

Formatting with colors with if condition in VBA

  1. #1
    Forum Contributor
    Join Date
    01-17-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    402

    Formatting with colors with if condition in VBA

    I have 50 rows in which I need to format the entire filled cells with a pirticular format.
    The below macro is which i want to use for formatting that filled cells if the rows has a word Total then formatting should apply.

    The formatting macro which i have is

    Please Login or Register  to view this content.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Formatting with colors with if condition in VBA

    why do you need a macro for this, when you do it quite easily with regular conditional formatting?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Contributor
    Join Date
    01-17-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    402

    Re: Formatting with colors with if condition in VBA

    As I am trying to automate it .
    I got something here from google and it is formatting for entire row with the given condition. I need to format only the filled cells. Could you please edit the below macro and see that it will format only the cells which are filled.

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    01-17-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    402

    Re: Formatting with colors with if condition in VBA

    Any help is appreciated

  5. #5
    Forum Contributor
    Join Date
    12-14-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    102

    Re: Formatting with colors with if condition in VBA

    Here is a macro I'm using. You just need the RGB color code (google for codes).

    Please Login or Register  to view this content.

+ 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