View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Revolvr Revolvr is offline
external usenet poster
 
Posts: 30
Default Working with cells that generate errors

Hi all,

I have an excel workbook where I read in text strings and then do some
manipulation of these strings. Some of the data is freeform text, and
sometimes the text itself causes errors. For example, if I have a cell
with contents something like "=-\tSome Words" (without the quotes).
This string causes a NAME error.

What I want to be able to do, in VBA, is read in the text string to a
value and move it to some other cell. Every time I do this I get an
error 2029, or a "Type Mismatch" error (Err.num=13). I understand I
can put an apostrophe in front of the text. Problem Is I get an error
any time I reference the cell, so I cannot read it in to a string
variable to add the apostrophe.

What is a good way to handle this situation?

TIA!