+ Reply to Thread
Results 1 to 3 of 3

Format Conditionally with VBA

  1. #1
    Registered User
    Join Date
    01-07-2008
    Posts
    65

    Format Conditionally with VBA

    I'm relatively familiar with VBA in Access, but not in Excel.

    What I would like to do is, for each tab, go down all the rows in which column A is not null and format the row based on the text in column A.

    So if column A does not begin with a dash the row gets a fill of a certain color.

    If column A begins with a dash the row gets no fill.

    How can I accopmlish this. Even having to run the code 1 time for each tab would be fine.

    The reason I need this, is that I have to view spreadsheets on my android phone and I can't find an app that will run excel with conditional formatting. So I have to make the formatting permanent before I put the spreadsheet onto my phone. So if there's an easier way to accomplish this, please let me know.

    Thanks

  2. #2
    Forum Contributor
    Join Date
    12-28-2011
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    280

    Re: Format Conditionally with VBA

    Hi

    Try this:
    Please Login or Register  to view this content.
    Stick this in a standard module in your workbook and run the code.

  3. #3
    Registered User
    Join Date
    01-07-2008
    Posts
    65

    Re: Format Conditionally with VBA

    Thanks Firefly2012, that code just about works.

    I had to change .EntireColumn to .EntireRow

    The only problem is the formatting is applied only to the first row on each sheet. I would like to apply it at least to the first 200 rows. How can I accomplish this?

    Thanks again

+ 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