Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / April 2008

Tip: Looking for answers? Try searching our database.

Conditional formatting - linked workbooks

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sandy82 - 19 Apr 2008 11:18 GMT
Hi Excel Experts

I am creating several workbooks, one will be mine, and the others linked to
mine and sent to people for them to revise and return to me to enable mine to
automatically update, (the linked cells will contain blanks or numbers).  
Please could you tell me if there is a formula I could use in conditional
formatting to enable me to identify in my workbook which linked cells will
have changed,  i.e. when a number is revised or added to blank cell the font
colour changes , or if the number is deleted the blank cell changes colour?

I hope I have explained myself correctly

Many thanks

Signature

Sandy

Shane Devenshire - 20 Apr 2008 17:29 GMT
Hi Sandy,

This is not a conditional formatting issue.  You could consider an
Worksheet_Change macro.  Something like this:

Private Sub Worksheet_Change(ByVal Target As Range)
   If Target = "" Then
       Target.Interior.ColorIndex = 6
   Else
       Target.Font.ColorIndex = 3
   End If
End Sub

However, this will format the cell if the user changes something and then
changes it back to the original value, for example they use undo.

Also, as written this works with every cell in the worksheet.  If you want
to control which cell you need to define the range by adding something like

Private Sub Worksheet_Change(ByVal Target As Range)
   Set isect = Application.Intersect(Target, [MyRange])
   If Not isect Is Nothing Then
   If Target = "" Then
       Target.Interior.ColorIndex = 6
   Else
       Target.Font.ColorIndex = 3
   End If
   End If
End Sub

This code needs to be added to the Sheet module of any sheets where you want
it to work.  Note that MyRange is a range name you have defined in the
spreadsheet.

You can compare two workbooks for changes using one of the VBA add-ins you
can find on the Web - Google "Compare workbooks" and skip the ones that use
Excel's built in command Windows, Compare...

Cheers,
Shane Devenshire
Microsoft Excel MVP

> Hi Excel Experts
>
[quoted text clipped - 13 lines]
>
> Many thanks
Sandy82 - 21 Apr 2008 06:50 GMT
Hi Shane

Many thanks for this I will try the macro out first.

Best regards
Sandy

> Hi Sandy,
>
[quoted text clipped - 55 lines]
> >
> > Many thanks
Sandy82 - 30 Apr 2008 20:25 GMT
Hi Shane,

Once again many thanks for your help, the macro works really well but could
you possibly help me with another problem - is there a macro I could use in
the spreadsheet with the links so that it picks up the format changes from
the linked cells?  
Sandy

> Hi Shane
>
[quoted text clipped - 62 lines]
> > >
> > > Many thanks

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.