ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Format of cell (https://www.excelbanter.com/excel-discussion-misc-queries/222416-format-cell.html)

GARY

Format of cell
 
Cells A!, B1, C1 and D1 have a "General" format:

A1 contains 5
B1 contains 6
C1 contains 2
D1 contains formula =A1+B1 so 11 is displayed.

When I change the formula in D1 to =A1+C1 and press "Enter", the
format of D1 changes to "Text" so "=A1+C1" is displayed.

I then have to change the format of D1 to "General" and press F2.
Now 7 is displayed in D1.

(This also happens if the four cells have a "Number" format).

How can I keep the cell's original format?

..

Sheeloo[_3_]

Format of cell
 
I suspect that the value in C1 is stored as a text.

Try this
=ISNUMBER(C1) in any cell... if you get FALSE then that is the source of
your problem.

Or
=ISTEXT(C1) will give you TRUE

"GARY" wrote:

Cells A!, B1, C1 and D1 have a "General" format:

A1 contains 5
B1 contains 6
C1 contains 2
D1 contains formula =A1+B1 so 11 is displayed.

When I change the formula in D1 to =A1+C1 and press "Enter", the
format of D1 changes to "Text" so "=A1+C1" is displayed.

I then have to change the format of D1 to "General" and press F2.
Now 7 is displayed in D1.

(This also happens if the four cells have a "Number" format).

How can I keep the cell's original format?

..



All times are GMT +1. The time now is 02:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com