+ Reply to Thread
Results 1 to 5 of 5

Conditional Formating Macro Formula

  1. #1
    Crowbar via OfficeKB.com
    Guest

    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. #2
    Toppers
    Guest

    RE: 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. #3
    Tom Ogilvy
    Guest

    Re: 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. #4
    Crowbar via OfficeKB.com
    Guest

    RE: 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. #5
    Crowbar via OfficeKB.com
    Guest

    Re: 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1