Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
rj rj is offline
external usenet poster
 
Posts: 2
Default Colour cells of specific value?

Hi all,

I want a macro that checks through the current worksheet and colours
every cell that has a specified value.. Eg. if F12 has "BAD" typed in
it, then F12 should be coloured red..

thanks in advance..

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,101
Default Colour cells of specific value?

You don't need a macro simply use conditional formatting. select all the
cells on the worksheet and set up the conditional format to be red if the
cell contents match your criteria.

Mike

"rj" wrote:

Hi all,

I want a macro that checks through the current worksheet and colours
every cell that has a specified value.. Eg. if F12 has "BAD" typed in
it, then F12 should be coloured red..

thanks in advance..


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Colour cells of specific value?

See http://www.contextures.com/xlCondFormat01.html

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"rj" wrote in message
ps.com...
Hi all,

I want a macro that checks through the current worksheet and colours
every cell that has a specified value.. Eg. if F12 has "BAD" typed in
it, then F12 should be coloured red..

thanks in advance..



  #4   Report Post  
Posted to microsoft.public.excel.misc
rj rj is offline
external usenet poster
 
Posts: 2
Default Colour cells of specific value?

thanx, that would work, but i need it as part of a macro so the changes
take place (and other changes as well) when i click a button..


On Nov 2, 1:32 pm, "Bob Phillips" wrote:
Seehttp://www.contextures.com/xlCondFormat01.html

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"rj" wrote in glegroups.com...

Hi all,


I want a macro that checks through the current worksheet and colours
every cell that has a specified value.. Eg. if F12 has "BAD" typed in
it, then F12 should be coloured red..


thanks in advance..


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Colour cells of specific value?

With Range("F12")
If .Value = "BAD" Then
.Interior.Colorindex = 3
Else
.Interior.Colorindex = xlColorindexNone
End If
End With


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"rj" wrote in message
ups.com...
thanx, that would work, but i need it as part of a macro so the changes
take place (and other changes as well) when i click a button..


On Nov 2, 1:32 pm, "Bob Phillips" wrote:
Seehttp://www.contextures.com/xlCondFormat01.html

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"rj" wrote in

glegroups.com...

Hi all,


I want a macro that checks through the current worksheet and colours
every cell that has a specified value.. Eg. if F12 has "BAD" typed in
it, then F12 should be coloured red..


thanks in advance..




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
adding specific cells Shooter Excel Worksheet Functions 1 January 23rd 06 04:42 PM
checking that cells have a value before the workbook will close kcdonaldson Excel Worksheet Functions 8 December 5th 05 04:57 PM
Will excel add cells using colour coding eg Add all red cells Wildwoody Excel Discussion (Misc queries) 4 October 21st 05 01:02 AM
i want to use the =if function to apply a colour to other cells pookie1970 Excel Worksheet Functions 1 June 20th 05 05:53 PM
Adding colour to a range of cells based on one of the cells v... McKenna Excel Discussion (Misc queries) 4 March 11th 05 02:25 PM


All times are GMT +1. The time now is 02:18 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"