Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Change cell background based on multiple cells

This is what I'm trying, unsuccessfully, to do:

If the value of A1 is "Hourly" AND the value of C3 is <10, change the
background to yellow
If the value of A1 is "Salary" AND the value of C3 is 14, change the
background to green

I have been unable to do this using conditional formatting.
Can someone help with VB?

Thanks!!

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Change cell background based on multiple cells

Formula is

=AND($A$1="Hourly",$C$3<10)


2nd condition


=AND($A$1="Salary",$C$314)


works for me


--
Regards,

Peo Sjoblom

wrote in message
ups.com...
This is what I'm trying, unsuccessfully, to do:

If the value of A1 is "Hourly" AND the value of C3 is <10, change the
background to yellow
If the value of A1 is "Salary" AND the value of C3 is 14, change the
background to green

I have been unable to do this using conditional formatting.
Can someone help with VB?

Thanks!!



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Change cell background based on multiple cells

Thanks!

Now I'm having another problem with it.

This is going to be part of a macro, and the number of rows may change
with each worksheet.

When I apply the formatting to the entire column, which includes a
header row, the highlighed cells are shifted up one row because the
header is included.
So my question is, how can I exclude the header and have the correct
cells highlighted?

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
Auto change background of color based on formula fredwing Excel Worksheet Functions 3 January 4th 07 12:45 AM
What is the macro to change background based on numeric cell value Still learning Excel Worksheet Functions 2 June 21st 06 05:58 PM
change background row color with change of date in a cell Urszula Excel Discussion (Misc queries) 5 May 17th 06 07:56 AM
Change font and background color of several cells based on result of a formula Zenaida Excel Discussion (Misc queries) 2 April 27th 06 06:46 PM
Is it possible to change colors of cells based on value in cell (. LC Excel Worksheet Functions 3 January 14th 05 05:27 AM


All times are GMT +1. The time now is 07:43 AM.

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"