K
ker_01
I'm trying to get the following line of code to work;
mywrksht.Range(Usecol & CStr(rw)).Value = TotalDataArray(J, rw)
I'm parsing a text file and loading the data; it crashes on a value of "= =
="- three equals signs (although I added spaces between them here for
readability, I think they are sequential in the real file). Throughout the
file I'll get strings of various lengths of equal signs, depending on where
I'm parsing.
I can see why Excel doesn't like a cell starting with an equals sign when
the string doesn't work as a valid formula... on the other hand, I can't
control the formatting of the source document, so I'm stuck with what gets
pulled in. Throughout the document, rows of 'equals' symbols are used to
separate sections of the document. I can't throw a single apostrophe in
front of every incoming cell value, because I need many of the values as
numbers for later processing.
My less-elegant solution would be to check the Left(value, 1) to see if it
is an equals sign and add an apostrophe, but that adds a whole extra
calculation to each value I bring in. Is there a better way?
Thank you,
Keith
mywrksht.Range(Usecol & CStr(rw)).Value = TotalDataArray(J, rw)
I'm parsing a text file and loading the data; it crashes on a value of "= =
="- three equals signs (although I added spaces between them here for
readability, I think they are sequential in the real file). Throughout the
file I'll get strings of various lengths of equal signs, depending on where
I'm parsing.
I can see why Excel doesn't like a cell starting with an equals sign when
the string doesn't work as a valid formula... on the other hand, I can't
control the formatting of the source document, so I'm stuck with what gets
pulled in. Throughout the document, rows of 'equals' symbols are used to
separate sections of the document. I can't throw a single apostrophe in
front of every incoming cell value, because I need many of the values as
numbers for later processing.
My less-elegant solution would be to check the Left(value, 1) to see if it
is an equals sign and add an apostrophe, but that adds a whole extra
calculation to each value I bring in. Is there a better way?
Thank you,
Keith