Excel: Keep format of a reference cell

Solved
alainjjb Posted messages 821 Status Membre -  
alainjjb Posted messages 821 Status Membre -
Hello,
I have an Excel spreadsheet that includes several sheets referring to the first one (which serves as reference data). The color of the data is significant, but when I reference a cell from the first sheet in another sheet, the format does not carry over. (=Sheet1!B19).
Can anyone help me?
Thank you in advance
Alain
Configuration: Windows Vista / Firefox 3.6.15

7 réponses

mic13710 Posted messages 1165 Registration date   Status Membre Last intervention   360
 
It is impossible by standard.

When you create dependent cells (i.e. those that contain formulas, simple or complex, whose result depends on one or more other cells), there is no format relation from one cell to others. It is only a result of calculation, mathematical or logical. Nothing more.
When you write a formula, Excel tries to give the cell a display format (date, financial, time, etc.) that it thinks best fits based on the display format of the main data.
Similarly, if you create a sequence (such as a title row) and write in an adjacent cell, Excel will assume that you are trying to continue the sequence and will assign the format of the previous cell by default. Otherwise, the standard format is assigned.
If you copy/paste one or more cells, Excel will default to pasting the formats of the copied cell(s).
But in all cases, the simple formats assigned and validated remain as they are for the cell, regardless of the cell's content.

If you want specific formats based on cell values or calculation results (which seems to be your case), there are only 2 solutions:
either you apply conditional formats to the cell
or, if that is not sufficient, you will have to resort to macros.

Michel
4