I am trying to get cells to change to a preset colour when a particular 3 digit code is entered. I can get 3 colours using conditional formatting but need to have 6. Is this possible using another formula?? Can anyone help.
Cheers
Jez
I am trying to get cells to change to a preset colour when a particular 3 digit code is entered. I can get 3 colours using conditional formatting but need to have 6. Is this possible using another formula?? Can anyone help.
Cheers
Jez
Hi,
This post should help
http://www.mrexcel.com/archive/Formatting/12054.html
or
http://www.vbaexpress.com/kb/getarticle.php?kb_id=90
It needs VBA code so you will need to entry in VB editor. See attahced for info
http://www.contextures.com/xlvba01.html
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 !!!
Hi,
With VBA, you can have multiple conditions and multiple colors ...
you are no longer limited to the 3 conditions of standard conditional formatting
see attached
HTH
Carim
![]()
Thanks for the help so far. If I want to specify colours for 6 3 letter codes (LTH, MBA, RKE, AHO, BGL, DHO) who do i go about altering the code as yours is set to 26 single letters as I'm not sure how to get the table ref in. See attached exmaple.
Cheers
Jez
hey guys....
i wanna ask something which relates to this particular thread...
the example codes and worksheets that you guys posted, i havea question regarding that. I can't seem to get mine working, cause i don't raelly know how to automatically assign it to my worksheet,i.e. do i need to setup a button or a command switch ?
regarding the respective colour index, do you may have a list of all the colours ?
thanks in advance
cheers guys
Hi,
Add the code to the sheet you want the changes to happen in e.g Sheet 1 . See attached link
http://www.contextures.com/xlvba01.html#Worksheet
VBA Noob
hey VBA Noob...Originally Posted by VBA Noob
thanks for the reply, but it still won't run. do i have to activate anything ? cause i followed the guide from the link, still stuck
cheers
Explain what you've done then or post an example
VBA Noob
i did exactly what the guide says...
1.Copy the code that you want to use
2.Select the worksheet in which you the code to run
3.Right click on the sheet tab and choose View Code, to open the Visual Basic Editor.
4.Where the cursor is flashing, choose Edit | Paste
what am i suppose to do after that ?
cheers
edit: found out what went wrong in my request....everything's a-okay now, thanks a whole bunch
cheers
Last edited by EddyAddelan; 12-06-2006 at 08:09 AM.
Hello.
I have tried the routine and it works. I have a problem with one of it's features though.
![]()
Please Login or Register to view this content.
I want to compare the values to in the target range to a cell D3 in another sheet called "Settings". How can I do that? The value in cell D3 is "705".
I also want be able to format the target range in case I write "OK" in the target range.
What I can see in this code is that it only accepts integer values? How can I change it so that it accepts any kind of values?
/Anders
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks