+ Reply to Thread
Results 1 to 11 of 11

How do I autofill colors, based on input of text

  1. #1
    Registered User
    Join Date
    06-16-2008
    Posts
    43

    How do I autofill colors, based on input of text

    Or atleast this being my first day working with excel formula's... its tricky to me. lol. im at work and i'm working on a project that will allow us to track our airplanes. i dont know if its ok to ask this in here, but o well...

    what i'm trying to do is have a formula that when certain text is typed into column 'b' (fmc, nmcmc, etc... anyways..) when an airplane is 'fmc' its 'green' and i want the aircrafts tail number block in column 'a' to autofill in with a green color, and when its 'nmcmc, i want it to be red. when its 'bq' i want it to autofill in as yellow.

    maybe your wondering why i need it this way, well... my boss makes the rules. lol so thats why. if anyone can point me in the right direction i would be greatly appreciative. thanks in advance =)

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Please take the time to read our forum rules prior to posting.

    Then amend your title to suit the question you're asking.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127
    Reseach "Conditional Formatting". That should solve the issue at hand.

  4. #4
    Registered User
    Join Date
    06-16-2008
    Posts
    43
    yea, sorry about that, i read the rules (now, lol), but dont know how to change the title...

  5. #5
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Thank you. There is a suggestion below from BigBas

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  6. #6
    Registered User
    Join Date
    06-16-2008
    Posts
    43
    bigbas, thanks for the suggestion, however i've been trying that. make i'm just clueless (its very possible, i know..) all i need excel to do is when i type 'fmc' in column 'b' then the corresponding row in column 'a' will fill in with a green color, and the same technique but when i type 'nmcmc' in column 'b' to fill a red color in the coressponding row in column 'a' i'm using both exel 2003 (at work) and the new version (whichever is on vista..) at home. this isnt my normal job, i just wanted to do this little project my annual review is comming up and i wanna add something extra.. uughh...military.... hope anyone can help. =)

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    So you selected column A... went to Format|Conditional Formatting...

    Chose Formula Is from 1st drop down and entered formula: =B1="fmc"

    Clicked Format and chose green colour...

    Clicked Add and repeated above with =B1="nmcmc" and chose red

    repeated and used formula =B1="bq" and chose yellow...

    ?

  8. #8
    Registered User
    Join Date
    06-16-2008
    Posts
    43
    =) like i said, i'm a little... uumm.... slow... lol. yes it worked like a champ.

  9. #9
    Registered User
    Join Date
    06-16-2008
    Posts
    43
    one more thing, i promise, i know i can only have 3 conditional formats, however like i mentioned before i need only 3 colors (green, red, and yellow) but i have different aircraft status, nmcmc, nmcmd, nmcse (all of those should be displayed in red) but i tried figuring it out myself and no luck... can you point me in the write direction? thanks so much for all the help =)

  10. #10
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Replace the formulas with OR() formulas which group the conditions...

    e.g. =OR(B1="nmcmc", B1="nmcmd", B1="nmcse")

  11. #11
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Use a formula like

    =ISNUMBER(SEARCH("nmc",B1))
    It assumes the words nmcmc, nmcmd, nmcse are the only words with nmc in the cell otherwise use

    =OR(ISNUMBER(SEARCH("nmcmc",B1)),ISNUMBER(SEARCH("nmcmd",B1)),ISNUMBER(SEARCH("nmcse",B1)))
    VBA Noob

+ 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