+ Reply to Thread
Results 1 to 6 of 6

Color fonts in column G Based on Contents in Column E

  1. #1
    Registered User
    Join Date
    01-21-2009
    Location
    Nanning, China
    MS-Off Ver
    Excel 2003
    Posts
    12

    Color fonts in column G Based on Contents in Column E

    Hello
    I have created an Excel spreadsheet teachers schedule for a small school with 8 teachers. I have assigned a number to each teacher (1 - 8) so that a number typed in a cell in Column E will cause a teachers name to appear in a cell in Column G. The ranges are E3:E20 and G3:G20. I hope to find a Macro that will display each teachers name in a different color. Thank you everyone for your assistance.
    Last edited by ChinaReg; 01-22-2009 at 10:23 AM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    See the code in this earlier post, you should be able to adapt it for what you need.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606
    You could use the worksheet change event. Right-click worksheet tab, view code and paste this in. It colours the cell, but be altered to font, and vary the numbers to change actual colours.
    Please Login or Register  to view this content.
    Last edited by StephenR; 01-21-2009 at 08:47 AM.

  4. #4
    Registered User
    Join Date
    01-21-2009
    Location
    Nanning, China
    MS-Off Ver
    Excel 2003
    Posts
    12
    Thank you StephenR and RoyUk for responding so quickly. Stephen your answer is the best fit for my situation. I have a followup question if I may. Is it possible to extend the code to other columns on the same page? It works great in column E and G,but can the code be expanded to column I and K, M and O and so on? Many Thanks

  5. #5
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606
    I'm not sure what "and so on" might entail, but this should work up to col O:
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    01-21-2009
    Location
    Nanning, China
    MS-Off Ver
    Excel 2003
    Posts
    12
    Thanks again Stephen, you understood exactly what I needed and it works perfectly. This one is solved!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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