Results 1 to 4 of 4
  1. #1
    Star Lounger
    Join Date
    May 2002
    Location
    Loveland, Ohio, USA
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Conditional Formatting Formula (Excel 2003)

    Is there any way to control the formatting of a cell based on the first three letters of a text string in that cell? Say I have the following 3 cells:

    GKB5
    GSC1
    BKA1

    Based on the first three characters, I would like to control the background color of the cell. In addition to that, would it be possible to control, bold, text color...?

    Thanks,

    Andy

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Conditional Formatting Formula (Excel 2003)

    Select the cells and then select Conditional Formatting from the Format menu. Drop down the left dropdown list and select "Formula is". In the formula box enter the following formula:

    <code>
    =LEFT(A1,3)="GKB"
    </code>

    Change A1 in the above formula to whatever cell is the active cell in the cells you selected above. Click the format button and select whatever formatting you want.

    Click the Add button and enter a similar formula for GSC and again for BKA.
    Legare Coleman

  3. #3
    Star Lounger
    Join Date
    May 2002
    Location
    Loveland, Ohio, USA
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Conditional Formatting Formula (Excel 2003)

    Thanks Legare,

    I forgot about the limitation of three items for conditional formatting. I actually need more than 3. Is there a way around that? I think I saw something before, but do not remember how it was done.

    Thanks,

    Andy

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Conditional Formatting Formula (Excel 2003)

    You can use the Worksheet_Change event procedure. See for example <post:=341,606>post 341,606</post:>.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •