Can I assign both content and format from one cell to another?

I can set a cell’s content by using “equals” =A1
I want to copy A1’s format as well.
Suppose I have A1’s font to include strikethrough.
If elsewhere I have a cell set to =A1, it gets the contents, but not the strikethrough.
Like =A1,FORMAT=FORMAT(A1)

Use the styles, the Conditional Format feature instead of the direct (manual) formatting method.
(And you can use the cell function STYLE() at end of the cell formula.)

2 Likes

If you want to do it as direct formatting, then go this way: Copy the source cell to clipboard, e.g. Ctrl+C. Go to target cell. Open Paste Special dialog, e.g. by Ctrl+Shift+V or via Edit menu. In that dialog make sure item Formats is checked in section Paste (or simply use item All) and–the important part–check item As Link in part Options. That will insert an absolute reference to the source cell into the target cell and copies the format of the source cell. However the format is not linked to the source cell, so changing the format in the source cell will not affect the format of the target cell.

I wouldn’t go the way of direct formatting but would use styles and/or conditional formatting. When the format of the source cell is set by a style, then the way via Ctrl+Shift+V will set the target cell to the style as well.

When you enter =A1 manually you need to format the target cell manually, e.g. by using the paint brush tool. It copies direct formatting and styles as well.

4 Likes

Another not really recommendable solution doing in in one go with the help of a Subroutine (“macro”).
By an UDF it can’t be done because statements of its code for changing format properties would be ignored.
disask_134043_justforfun.ods (13.9 KB)