Results 1 to 4 of 4

Changing font color in a range

Threaded View

  1. #1
    Registered User
    Join Date
    10-05-2009
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    15

    Changing font color in a range

    I am working on a project that deals with accounts. The accounts have an account number, and cost, and a status. I am looking for either a function or VBA code to change the color of some font. I have not had success with Conditional Formating, but that is probably because my lack of knowledge in that area. Attached is a sample worksheet I put together.

    There are 3 different statuses an account can have: 0 (New), 1 (Existing), or 2 (Closed). I also have 2 buttons, one labled Open Accounts, the other labeled All Accounts. Pressing the Open Accounts button, the word "Open" is inserted into cell A1, and when you press the All Accounts button, the words "All Accounts" are inserted into cell A1.

    My sample data is in range B6:D15. In Coulmn A, next to my sample data set, I have this function: =IF(AND($A$1="Open",D7=2),"0","1") that if the word "Open" is in cell A1, any New or Open accounts(based on their status in Column D) will have a 1 placed in column A, and if the account is Closedbased on their status in Column D), it will have a 0. When All Accounts is in A1, all the accounts will have a 1 in Column A.

    What I am trying to do is anytime there is a 0 in column A, I want the corresponding cells in columns B, C, and D to have to font changed to the color white (so it seem they are not there). I cannot change the whole rows color, as there is going to be data in columns J-O that the font must not change color. Now my original worksheet is a little more complicated. It will never have a set number of accounts, but I figured this would help get my point across.

    Thanks in advanced,

    Matthew
    Attached Files Attached Files
    Last edited by mrayray09; 06-23-2010 at 11:14 AM.

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