+ Reply to Thread
Results 1 to 1 of 1

VBA auto fill cell based on text above it

  1. #1
    Forum Contributor
    Join Date
    04-05-2013
    Location
    CT
    MS-Off Ver
    Excel 2010
    Posts
    360

    VBA auto fill cell based on text above it

    I'm looking to write a code that will automatically fill a cell with a specific color code when an specific # is entered in the cell above it. For instance.

    Cells H11:K11 you can enter #'s 1 through 168 and also the letter 'N'.
    under each of these cells H12:K12 i would like a specific color code filled in depending on the # above it.

    A basic example of the colors is: 1=black, 3=red, 5=blue, 7=black, 9=red, 11=blue, etc. (the same goes for 2=black, 4=red, 6=blue) see attached color code chart for clarity.
    So if 1, 3, 5 and N is entered in cells H11:K:11 the colors in cell H12:K12 should be B (black),R (red), BL (blue), W (white).

    Now the kicker is that in cell D13 there are 3 options that may change the colors. (1.LV 2.HV or 3.NA)
    LV = black (B), red (R), blue (BL), white (W) HV=brown (BR), orange (O), yellow (Y), gray (G) NA = user can enter any color regardless of the color

    So to go back to the example. If HV is selected then 1=(BR) brown, 3, (O) orange, 5= (Y)yellow, N= (G)gray. etc.

    Attached is my sample excel sheet, i have only started to change this to row 18 (so everything below that is an old format) Hope this makes sense.
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by adamheon; 02-19-2014 at 12:33 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to auto-fill text based on Value'8000,8001' in another cell
    By Shimazu in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-17-2014, 05:51 AM
  2. Replies: 2
    Last Post: 11-29-2012, 11:27 AM
  3. Replies: 1
    Last Post: 05-06-2010, 03:09 AM
  4. Auto fill a range based on another cell
    By Ricardo9211 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-29-2009, 04:58 PM
  5. [SOLVED] How to auto-fill text based on text in another cell
    By Jason in forum Excel General
    Replies: 2
    Last Post: 02-16-2005, 04:37 PM

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