Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Jan 2004
    Posts
    196
    Thanks
    1
    Thanked 0 Times in 0 Posts

    single cell format within a range (2003)

    I have cells A1:E4. I am needing to make a copy of this range and compare the copied data with any changes that may take place in the orginal data, making the orginal cell change background color and text color, so that the user can see that the cell dose not match the orginal contents(which was copied first). Can someone please Help me?
    Thanks,
    Jackal

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: single cell format within a range (2003)

    Say that you copy the original values to A9:E12.

    Select A1:E4.
    Select Format | Conditional Formatting...
    The first dropdown ('Cell value is') is OK.
    Select 'is equal to' in the second dropdown.
    Enter =A9 in the box next to it.
    Click the Format... button and specify the formatting you like.
    Click OK (twice).

    Because the comparison value =A9 is a relative reference, it is adjusted for the other cells in the selection. See attached example.

  3. #3
    2 Star Lounger
    Join Date
    Jan 2004
    Posts
    196
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: single cell format within a range (2003)

    Hans, I have taken the info you provided and came up wiht this macro:

    Sub Test()
    Dim orng as Range 'orginal range
    Dim nrng as Range 'new range
    set orng = Range("A1:CX1728")
    orng.Copy
    Range("A2002").PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:=xlNone, _
    SkipBlanks:=False, Transpose:=False
    Range("A2002").PasetSpecial Paset:=xlPasetFormats, Operation:=xlNone, _
    SkipBlanks:=False, Transpose:=False
    Application.CutCopyMode = False
    Set nrng = Selection
    orng.Select
    orng.FormatConditions.Delete
    orng.FormatConditions.Add Type:=xlCellValue, Operator:=xlNotEqual, Formula1:="=A2002"
    With orng.FormatConditions(1).Font
    .Bold = True
    .Italic = False
    .ColorIndex = 52
    End With
    orng.FormatConditions(1).Interior.ColorIndex = 40
    End Sub

    And this works prefectly!! thanks...
    Jackal

Posting Permissions

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