formatting issue

  • Thread starter Thread starter scrabtree
  • Start date Start date
S

scrabtree

Two questions: I have a macro that converts the format of
a cell from general to text but the value inside the cell
doesn't change accordingly unless it is re-typed. Is
there some way to "refresh" the page to make the values in
the current cells recognize the new format?

Number 2: Cell one has a social security number in it and
is special formatted as social security number. Cell two
has the same value in it but is formatted general. An if
statement compares those two cells and says they are not
equal. I want it to say they are equal???
 
scrabtree said:
Two questions: I have a macro that converts the format of
a cell from general to text but the value inside the cell
doesn't change accordingly unless it is re-typed. Is
there some way to "refresh" the page to make the values in
the current cells recognize the new format?

Number 2: Cell one has a social security number in it and
is special formatted as social security number. Cell two
has the same value in it but is formatted general. An if
statement compares those two cells and says they are not
equal. I want it to say they are equal???

scrabtree,

First a suggestion. If you ask two different questions, start 2
threads. ;-)

For your first question: please post your code so we can see what you
are trying to do.
 
scrabtree said:
Number 2: Cell one has a social security number in it and
is special formatted as social security number. Cell two
has the same value in it but is formatted general. An if
statement compares those two cells and says they are not
equal. I want it to say they are equal???

A hint: change both the cell's format to "General".
That will give you some hint why they are not equal.
Then change back to the format social security, and then to the
user-defined format (don't know the name in English, in Dutch it's
"Aangepast", the last in the list)
This will show you how the social security number format works.

The idea behind this is that there is no connection whatsoever between
the *value* of a number, and the *format* of a number. Comparing in
Excel compares only the *value*.
 
Back
Top