Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
jrd269
 
Posts: n/a
Default Cell Background Color Change according to numerical value


Conditional formatting will allow upto 3 conditions. I have five. How
can you write an IF() statement/s to allow numerical values to change
cell background color. 1-green, 2-blue, 3-yellow up to 5. Also how will
you nest multiple IF's, the help files, aren't helping.
-Joe


--
jrd269
------------------------------------------------------------------------
jrd269's Profile: http://www.excelforum.com/member.php...o&userid=23815
View this thread: http://www.excelforum.com/showthread...hreadid=374661

  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

Worksheet functions can't change cell background colors (or font colors,
borders, etc.).

If you need more than 3 conditions, you'll have to use VBA. If you
search the archives:

http://groups.google.com/advanced_gr...ugroup=*excel*

you'll find myriad ways of accomplishing this, depending on your
conditions.


In article ,
jrd269 wrote:


Conditional formatting will allow upto 3 conditions. I have five. How
can you write an IF() statement/s to allow numerical values to change
cell background color. 1-green, 2-blue, 3-yellow up to 5. Also how will
you nest multiple IF's, the help files, aren't helping.

  #3   Report Post  
jrd269
 
Posts: n/a
Default


from what the groups say, it looks like it cannot be done. which really
stinks. I will continue to look, thanks for some direction
-Joe


--
jrd269
------------------------------------------------------------------------
jrd269's Profile: http://www.excelforum.com/member.php...o&userid=23815
View this thread: http://www.excelforum.com/showthread...hreadid=374661

  #5   Report Post  
jrd269
 
Posts: n/a
Default


yes i tried the simple conditional formatting, but only three
conditions. Well 4 if you consider the default.
But I found this add in, that says it can support up to 30 conditional
formats found at:
http://xldynamic.com/source/xld.CFPlus.Download.html
might be worth checking out. I am going to get clearance then look into
it.
-Joe


--
jrd269
------------------------------------------------------------------------
jrd269's Profile: http://www.excelforum.com/member.php...o&userid=23815
View this thread: http://www.excelforum.com/showthread...hreadid=374661



  #6   Report Post  
Don Guillett
 
Posts: n/a
Default

Or you could always use a worksheet change event and select case for as many
as desired.

--
Don Guillett
SalesAid Software

"jrd269" wrote in
message ...

yes i tried the simple conditional formatting, but only three
conditions. Well 4 if you consider the default.
But I found this add in, that says it can support up to 30 conditional
formats found at:
http://xldynamic.com/source/xld.CFPlus.Download.html
might be worth checking out. I am going to get clearance then look into
it.
-Joe


--
jrd269
------------------------------------------------------------------------
jrd269's Profile:

http://www.excelforum.com/member.php...o&userid=23815
View this thread: http://www.excelforum.com/showthread...hreadid=374661



  #7   Report Post  
jrd269
 
Posts: n/a
Default


That site works wonderfully. Dbl click the .xla file and install it,
then you have to change a few marcos security settings and BAM it
works. I setup 5 conditional formats with 5 different colors and it
works. Great job to those people. Thank you lads.
-Joe


--
jrd269
------------------------------------------------------------------------
jrd269's Profile: http://www.excelforum.com/member.php...o&userid=23815
View this thread: http://www.excelforum.com/showthread...hreadid=374661

  #8   Report Post  
anilsolipuram
 
Posts: n/a
Default


You can use conditional format with cell value between 3 and 5


--
anilsolipuram
------------------------------------------------------------------------
anilsolipuram's Profile: http://www.excelforum.com/member.php...o&userid=16271
View this thread: http://www.excelforum.com/showthread...hreadid=374661

  #9   Report Post  
jrd269
 
Posts: n/a
Default


you can only add three conditions, after the third the 'add' button
becomes greyed.


--
jrd269
------------------------------------------------------------------------
jrd269's Profile: http://www.excelforum.com/member.php...o&userid=23815
View this thread: http://www.excelforum.com/showthread...hreadid=374661

  #10   Report Post  
anilsolipuram
 
Posts: n/a
Default


Yes conditional format has limitation of 3 conditions, you can use macro
for this.

I am codding the macro for conditional format for cell a2 but it can be
applied to any number cells.

you have to paste the below code, by right click sheet tab-view code
and past the below code.

test it by enter values 1,2,3,4,5,6 in cell a2

Private Sub Worksheet_Change(ByVal Target As Range)

If (Target.Address = "$A$2") Then
Range("a2").Select
temp = Selection.Value
If (temp = 1) Then
Selection.Interior.ColorIndex = 4
ElseIf (temp = 2) Then
Selection.Interior.ColorIndex = 33
ElseIf (temp = 3) Then
Selection.Interior.ColorIndex = 36
ElseIf (temp = 4) Then
Selection.Interior.ColorIndex = 48
ElseIf (temp = 5) Then
Selection.Interior.ColorIndex = 38
ElseIf (temp = 6) Then
Selection.Interior.ColorIndex = 30
End If
End If

End Sub


--
anilsolipuram
------------------------------------------------------------------------
anilsolipuram's Profile: http://www.excelforum.com/member.php...o&userid=16271
View this thread: http://www.excelforum.com/showthread...hreadid=374661



  #11   Report Post  
jrd269
 
Posts: n/a
Default


wow, thanks! I won't be able to try that until next week but thank you.
you a life saver.
-Joe


--
jrd269
------------------------------------------------------------------------
jrd269's Profile: http://www.excelforum.com/member.php...o&userid=23815
View this thread: http://www.excelforum.com/showthread...hreadid=374661

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
Excel should let me sort on cell background color mama Setting up and Configuration of Excel 5 July 5th 06 01:40 PM
up to 7 functions? ALex Excel Worksheet Functions 10 April 12th 05 06:42 PM
Syntax for inferred cell references donesquire Excel Worksheet Functions 4 April 4th 05 09:29 PM
inserting data from a row to a cell, when the row number is specified by a formula in a cell [email protected] New Users to Excel 2 January 6th 05 07:18 AM
VLookup resulting in a blank cell... KempensBoerke Excel Worksheet Functions 1 October 28th 04 09:57 PM


All times are GMT +1. The time now is 11:03 AM.

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

About Us

"It's about Microsoft Excel"