Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-09-2012, 05:01 PM
macropod's Avatar
macropod macropod is offline Conditional Formatting. Windows 7 64bit Conditional Formatting. Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,343
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default


An alternative approach, which doesn't require you to copy the existing data to a new location, is to add a macro like the following to the worksheet's code module:
Code:
Option Explicit
Dim NewVal As String, OldVal As String, NewAddr As String, OldAddr As String
 
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
NewVal = ActiveCell.Formula
NewAddr = ActiveCell.Address
If OldAddr <> "" Then
  With ActiveSheet.Range(OldAddr)
    If .Formula <> OldVal Then
      .Interior.ColorIndex = 6
    End If
  End With
End If
OldVal = NewVal
OldAddr = NewAddr
End Sub
With this macro, simply changing any cell's contents will change its background colour to yellow.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional formatting zanat0s Excel 4 01-20-2012 03:30 AM
Conditional Formatting. Conditional formatting with AND, OR Lucky Excel 2 10-03-2011 11:41 PM
Conditional Formatting namedujour Excel 3 08-25-2011 01:46 PM
Conditional Formatting. help with conditional formatting Snvlsfoal Excel 3 07-03-2011 11:55 PM
Conditional Formatting. * Conditional Formatting MS 2010 djreyrey Excel 3 06-03-2011 01:54 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:27 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft