Determining How An Existing Cell Is Formatted ?

B

Bob

ello,

Is it possible to see how a particular is formatted for ?

I did a little experimenting, and it seems that if I put in text, or
numbers, and go to Format Cell, it "seems" to indicate the Format is
General, for both.

Is there some command that would return an inquiry to a text cell as it
truly being "Text" ?

And, I understand that text when entered shows up to the left of the
cell, numbers to the right. If I change the left-right position with
the Alignment buttons, does this change the actual Format of the cell ?

Thanks,
Bob
 
G

Gord Dibben

See help on Information Functions, specifically the CELL function which returns
type of format.

Changing alignment does not change format.

Note that a valid Date is a number so ISNUMBER will return TRUE


Gord Dibben MS Excel MVP
 
B

Bob

Hi,

Thanks for help.

I guess I should have mentioned that I'm reall dumb with this;
new user, truly.

I looked at where you suggested, and found:

info_type Required.

A text value that specifies what type of cell information you want to
return. The following list shows the possible values of the info_type
argument and the corresponding results.
info_type Returns "address" Reference of the first cell in reference,as
text.

O.K. I click in the cell that I'm interested in know if it is formatted
as Text or as a Number.

Now, specifically what do I do next, please ?
What do I type for info_type ?
Where do I type it ?
etc.

Thanks again,
Bob
 
G

Gord Dibben

To find things out about a cell you do not click in that cell.

You select another cell and write a formula referring to the cell in question.

Type your name into A1

In B1 enter =ISTEXT(A1)

Should return TRUE

In C1 enter =ISNUMBER(A1)

Should return FALSE

For info-type you would enter in D1 =CELL("type",A1)

Will return l indicating text as in "label"


Gord
 
G

Gord Dibben

You are correect Ron

Excel does not distinguish between Text or General using any of the CELL
arguments

=CELL("format",A1) will return G if A1 contains text

ISTEXT would have to employed.

I posted that alternative.


Gord
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top