Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Linking cells, with values and formats: VBA

Hi!

I have various worksheets and I want to reference some cells and have the cell to have the original format (bold, color and pattern).

So for example A1=FEV12!A1, and A1 having the FEV12!A1's format, and updating everytime FEV12!A1's format changes.

I was reading a lot about it and came up with this sub, but it isn't working...

Sub FormatOfAssignment()
Dim rng As Range, cell As Range
Set rng = Selection
For Each cell In Intersect(rng, _
rng.SpecialCells(xlFormulas))
On Error GoTo passby
Range(Mid(cell.Formula, 2)).Copy
cell.PasteSpecial Paste:=xlFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
passby:
On Error GoTo 0
Next cell
End Sub

Can anyone help me out?

Thanks so much in advance!
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
Linking Formats (color) Between Cells in Diff Wsheets Russ ---------------------ance,Russ Excel Programming 2 October 23rd 09 12:05 PM
linking values and formats on from different sheets Rick Excel Worksheet Functions 3 August 31st 07 06:56 AM
Linking axes scale values to cells Gene[_3_] Charts and Charting in Excel 1 August 17th 07 08:59 AM
Linking Scrollbar Min and Max values to worksheet cells greg235 Excel Programming 1 August 1st 07 02:40 AM
Linking Formats Across Cells RB Excel Discussion (Misc queries) 1 June 16th 05 10:20 PM


All times are GMT +1. The time now is 03:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"