Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 128
Default Conditional Formating Macro Formula

Hi there

I have this conditional format that highlights items that have a value of a
1000

Columns("A:R").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=UPPER($C1)=""1000"""
Selection.FormatConditions(1).Interior.ColorIndex = 38

I want to keep this syntax but instead of highlighting items that are a 1000,
I want it to hightlight items between values 10000 and 19999 i.e.

If the cell contained 12564, it would then do the highlight

Does anyone know how to ammend this?

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200512/1
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default Conditional Formating Macro Formula

Try:

Selection.FormatConditions.Add Type:=xlExpression, Operator:=xlBetween, _
Formula1:="10000", Formula2:="19999"

"Crowbar via OfficeKB.com" wrote:

Hi there

I have this conditional format that highlights items that have a value of a
1000

Columns("A:R").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=UPPER($C1)=""1000"""
Selection.FormatConditions(1).Interior.ColorIndex = 38

I want to keep this syntax but instead of highlighting items that are a 1000,
I want it to hightlight items between values 10000 and 19999 i.e.

If the cell contained 12564, it would then do the highlight

Does anyone know how to ammend this?

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200512/1

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Conditional Formating Macro Formula

Columns("A:R").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=And(Upper($C1)=""10000"",Upper($C1)<=""19999"") "
Selection.FormatConditions(1).Interior.ColorIndex = 38


--

"Crowbar via OfficeKB.com" <u15117@uwe wrote in message
news:588a9f6cd3357@uwe...
Hi there

I have this conditional format that highlights items that have a value of

a
1000

Columns("A:R").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=UPPER($C1)=""1000"""
Selection.FormatConditions(1).Interior.ColorIndex = 38

I want to keep this syntax but instead of highlighting items that are a

1000,
I want it to hightlight items between values 10000 and 19999 i.e.

If the cell contained 12564, it would then do the highlight

Does anyone know how to ammend this?

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200512/1



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 128
Default Conditional Formating Macro Formula

Toppers wrote:
Try:

Selection.FormatConditions.Add Type:=xlExpression, Operator:=xlBetween, _
Formula1:="10000", Formula2:="19999"


This works for all cells in the columns formated. What I need is only the
data in column C but if column C needs to be formated differently so does the
whole row so I have one long pink line

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200512/1
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 128
Default Conditional Formating Macro Formula

Thanks Tom

That appears to work perfectly

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200512/1
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
Conditional Formating with IF and AND formula murkaboris Excel Discussion (Misc queries) 2 July 22nd 09 07:29 PM
formula or conditional formating Joseph[_4_] New Users to Excel 2 July 8th 09 10:18 PM
Conditional formating or Macro code [email protected] Excel Discussion (Misc queries) 3 June 14th 07 04:30 PM
Conditional Formating and Formula Wanna Learn Excel Discussion (Misc queries) 5 May 4th 07 08:25 PM
Formula for Conditional Formating - Help! Mark Campbell Excel Worksheet Functions 2 July 26th 06 07:57 AM


All times are GMT +1. The time now is 06:29 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"