View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tim Childs Tim Childs is offline
external usenet poster
 
Posts: 128
Default Determining Cell Types in Excel - exceptions

Tom

thanks for bearing with me on this.

the twist is that the data has been transferred to variant array and I am
checking whether it is possible to determine whether these functions work in
the same way once in the array: I realise they work but the contents of the
cell and the array contents are not necessarily interchangeable in this
context. To use an (imperfect) analogy isn't it something like the
difference between "37148" and the equivalent date-number "14-Sep-01" i.e.
the number label does not exist in the same way in the array as in the
workbook's cell.

any help/comment/feedback gratefully received.

Tim

"Tom Ogilvy" wrote in message
...
It wasn't terribly obvious what you question was/is. If you want to know
whether the value in a cell is stored as text or number, you can use the
isText and IsNumber worksheet functions

=isNumber(A1) will tell you how it is stored. (likewise istext)

You can select the whole range and do
Edit=GoTo=Special and select Constants and Text or Constants and Numbers
(after you paste special) to see which cells are being interpreted as
numbers and which as text.

So if determining how the information is stored in excel, then there are

two
methods.

--
Regards,
Tom Ogilvy

"Tim Childs" wrote in message
...
Tom

it is consistent, yes...but I know it is a number by
looking at it. But it is odd in that it is impossible to
produce this label-number with direct entry: Excel
automatically "processes" the string into a true value, if
you enter it from the keyboard.

I guess I hoped someone would come back with a formula of
the type "isnumeric" or some such thing that I may not
have come across.

THANKS

Tim

-----Original Message-----
your formula produces the String "123.67", so it would

seem consistent to
see it as text when you paste special.

if the formula were
=123.67

then if I do a paste special, it is a number.