Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Lock Cell Format - Allow copy and paste of data without format change | Excel Worksheet Functions | |||
copy cell format? | Excel Discussion (Misc queries) | |||
How do I copy data in single cell format to a merged cell format | Excel Discussion (Misc queries) | |||
how do i copy the format of a cell from one worksheet to another | Excel Discussion (Misc queries) | |||
Copy cell format to cell on another worksht and update automatical | Excel Worksheet Functions |