Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Copy format automatically from other cell

Copy this to wroksheet code:

Dim b As Boolean
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim r1 As Range
Dim r2 As Range

Set r1 = Range("A:A")
Set r2 = Range("B1")

If Intersect(Target, r1) Is Nothing Then
If b = True Then
Application.EnableEvents = False
r1.Copy
r2.PasteSpecial Paste:=xlPasteFormats
b = False
Target.Select
Application.EnableEvents = True
End If
Else
b = True
End If
End Sub

If you select a cell in column A and change its format, the formats of
column B will automatically pick up the A formats once a cell outside of
column A has been selected.
--
Gary''s Student


"מיכל" wrote:

hello,

I neet to create an automatically foramting for one column according to
anoter colomn formating.

I want the cell formating to change in one colomn whenever the formating it
changing in another colomn.

how can I do it ?
(I know how to use conditinal formating but I didnt find it helpful in that
case)

thank you.
Michal

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
Lock Cell Format - Allow copy and paste of data without format change Chris12InKC Excel Worksheet Functions 2 May 9th 23 07:42 PM
How to format this number cell automatically Orc Thrall Excel Discussion (Misc queries) 1 July 6th 06 02:23 AM
Urgent date/scheduling calc needed jct Excel Worksheet Functions 3 February 24th 06 01:36 AM
Copy cell format to cell on another worksht and update automatical kevinm Excel Worksheet Functions 21 May 19th 05 11:07 AM
prevent 4/5 in a cell automatically transfer to a date format kei Excel Discussion (Misc queries) 3 December 9th 04 11:52 AM


All times are GMT +1. The time now is 12:44 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"