Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 12
Default copy the same format to a cell using =

I am trying to copy a cell from one sheet to another and I use the = function
but it doesn't copy the same format ie: bold and under line etc.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default copy the same format to a cell using =

Functions can only return values, not change cell formats.

To link formats you'd need to use VBA. For example, this will copy the
formats from cells A1:A10 in Sheet1 to cells A1:A10 in Sheet2 whenever
Sheet2 is activated. Put it in the Sheet2 code module (right-click the
Sheet2 tab and choose View Code):

Private Sub Worksheet_Activate()
With Range("A1:A10")
Worksheets("Sheet1").Range(.Address).Copy
.PasteSpecial Paste:=xlFormats, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=False
End With
End Sub



In article ,
Del wrote:

I am trying to copy a cell from one sheet to another and I use the = function
but it doesn't copy the same format ie: bold and under line etc.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default copy the same format to a cell using =

If you copy and paste special as link you can carry over the format but it
is a double paste

Copy cell you want to link to, select the cell where you want this to
happen, do editpaste special and select paste link, then do editpaste
special again and this time select formats



--


Regards,


Peo Sjoblom




"Del" wrote in message
...
I am trying to copy a cell from one sheet to another and I use the =
function
but it doesn't copy the same format ie: bold and under line etc.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 396
Default copy the same format to a cell using =

Hi Peo

But this method doesn't change the formatting the destination cell when the
formatting in the source cell is changed, no?

I *think* that's what the OP asks for.

--
Wigi
http://www.wimgielis.be = Excel/VBA, soccer and music


"Peo Sjoblom" wrote:

If you copy and paste special as link you can carry over the format but it
is a double paste

Copy cell you want to link to, select the cell where you want this to
happen, do editpaste special and select paste link, then do editpaste
special again and this time select formats



--


Regards,


Peo Sjoblom




"Del" wrote in message
...
I am trying to copy a cell from one sheet to another and I use the =
function
but it doesn't copy the same format ie: bold and under line etc.




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default copy the same format to a cell using =

I don't know if the OP meant that and if he did it obviously won't work


--

Regards,

Peo Sjoblom

"Wigi" wrote in message
...
Hi Peo

But this method doesn't change the formatting the destination cell when
the
formatting in the source cell is changed, no?

I *think* that's what the OP asks for.

--
Wigi
http://www.wimgielis.be = Excel/VBA, soccer and music


"Peo Sjoblom" wrote:

If you copy and paste special as link you can carry over the format but
it
is a double paste

Copy cell you want to link to, select the cell where you want this to
happen, do editpaste special and select paste link, then do editpaste
special again and this time select formats



--


Regards,


Peo Sjoblom




"Del" wrote in message
...
I am trying to copy a cell from one sheet to another and I use the =
function
but it doesn't copy the same format ie: bold and under line etc.








  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default copy the same format to a cell using =

JE McGimpsey,

What if the range of cells in the origin sheet (in your example, Sheet1) is
linked to a different range of cells (contiguous or non-contiguous) in the
other sheet (in your example, Sheet2)? How would your formula have to chage?

I have a workbook which tracks 92 project timelines, which each have 27
separate tasks. The top worksheet is a progam summary of the critical
deadlines and looks nothing like the 92 project worksheets. I want them
linked so that the project managers will only fill in data on their project
sheets and not have to duplicate the data entry on the summary sheet. When a
target deadline has been met and the date completed confirmed, I want the
project managers to change the format of the data to bold, underline. I
assume that your formula will solve that, except for the difference in ranges.

--
kew


"JE McGimpsey" wrote:

Functions can only return values, not change cell formats.

To link formats you'd need to use VBA. For example, this will copy the
formats from cells A1:A10 in Sheet1 to cells A1:A10 in Sheet2 whenever
Sheet2 is activated. Put it in the Sheet2 code module (right-click the
Sheet2 tab and choose View Code):

Private Sub Worksheet_Activate()
With Range("A1:A10")
Worksheets("Sheet1").Range(.Address).Copy
.PasteSpecial Paste:=xlFormats, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=False
End With
End Sub



In article ,
Del wrote:

I am trying to copy a cell from one sheet to another and I use the = function
but it doesn't copy the same format ie: bold and under line etc.


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default copy the same format to a cell using =

You'd have to have some sort of explicit 1:1 correspondence between the
summary sheet cells and their references. There could be lots of ways to
do it - one brute force way:

With Worksheets("Summary")
Sheets("Project1").Range("B17").Copy
.Range("Z3").PasteSpecial Paste:=xlFormats
Sheets("Project22").Range("R4").Copy
.Range("L5").PasteSpecial Paste:=xlFormats
'etc
End With



In article ,
Doctrine Analyst wrote:

JE McGimpsey,

What if the range of cells in the origin sheet (in your example, Sheet1) is
linked to a different range of cells (contiguous or non-contiguous) in the
other sheet (in your example, Sheet2)? How would your formula have to chage?

I have a workbook which tracks 92 project timelines, which each have 27
separate tasks. The top worksheet is a progam summary of the critical
deadlines and looks nothing like the 92 project worksheets. I want them
linked so that the project managers will only fill in data on their project
sheets and not have to duplicate the data entry on the summary sheet. When a
target deadline has been met and the date completed confirmed, I want the
project managers to change the format of the data to bold, underline. I
assume that your formula will solve that, except for the difference in
ranges.

--
kew


"JE McGimpsey" wrote:

Functions can only return values, not change cell formats.

To link formats you'd need to use VBA. For example, this will copy the
formats from cells A1:A10 in Sheet1 to cells A1:A10 in Sheet2 whenever
Sheet2 is activated. Put it in the Sheet2 code module (right-click the
Sheet2 tab and choose View Code):

Private Sub Worksheet_Activate()
With Range("A1:A10")
Worksheets("Sheet1").Range(.Address).Copy
.PasteSpecial Paste:=xlFormats, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=False
End With
End Sub



In article ,
Del wrote:

I am trying to copy a cell from one sheet to another and I use the =
function
but it doesn't copy the same format ie: bold and under line etc.


  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default copy the same format to a cell using =

Thank you for the quick repsonse. Just one more dumb question...do the B17
and R4 cells correspond to the project sheets or the summary sheet?
--
kew


"JE McGimpsey" wrote:

You'd have to have some sort of explicit 1:1 correspondence between the
summary sheet cells and their references. There could be lots of ways to
do it - one brute force way:

With Worksheets("Summary")
Sheets("Project1").Range("B17").Copy
.Range("Z3").PasteSpecial Paste:=xlFormats
Sheets("Project22").Range("R4").Copy
.Range("L5").PasteSpecial Paste:=xlFormats
'etc
End With



In article ,
Doctrine Analyst wrote:

JE McGimpsey,

What if the range of cells in the origin sheet (in your example, Sheet1) is
linked to a different range of cells (contiguous or non-contiguous) in the
other sheet (in your example, Sheet2)? How would your formula have to chage?

I have a workbook which tracks 92 project timelines, which each have 27
separate tasks. The top worksheet is a progam summary of the critical
deadlines and looks nothing like the 92 project worksheets. I want them
linked so that the project managers will only fill in data on their project
sheets and not have to duplicate the data entry on the summary sheet. When a
target deadline has been met and the date completed confirmed, I want the
project managers to change the format of the data to bold, underline. I
assume that your formula will solve that, except for the difference in
ranges.

--
kew


"JE McGimpsey" wrote:

Functions can only return values, not change cell formats.

To link formats you'd need to use VBA. For example, this will copy the
formats from cells A1:A10 in Sheet1 to cells A1:A10 in Sheet2 whenever
Sheet2 is activated. Put it in the Sheet2 code module (right-click the
Sheet2 tab and choose View Code):

Private Sub Worksheet_Activate()
With Range("A1:A10")
Worksheets("Sheet1").Range(.Address).Copy
.PasteSpecial Paste:=xlFormats, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=False
End With
End Sub



In article ,
Del wrote:

I am trying to copy a cell from one sheet to another and I use the =
function
but it doesn't copy the same format ie: bold and under line etc.


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
copy cell format? Ltat42a Excel Discussion (Misc queries) 1 January 5th 06 02:00 AM
How do I copy data in single cell format to a merged cell format Paul Excel Discussion (Misc queries) 1 June 27th 05 11:00 AM
how do i copy the format of a cell from one worksheet to another Edith F Excel Discussion (Misc queries) 5 June 16th 05 09:17 PM
Copy cell format to cell on another worksht and update automatical kevinm Excel Worksheet Functions 21 May 19th 05 11:07 AM


All times are GMT +1. The time now is 08:58 AM.

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

About Us

"It's about Microsoft Excel"