scientific notation to text formatting question

  • Thread starter Thread starter dtdd
  • Start date Start date
D

dtdd

I have a string that looks like "92343E102".
When I assign it:
Worksheet.Cells(outrow, 3) = strTest

Excel converts the string to scientifc notation "9.23E+106"

how do I presrve the string the way it is?

Thanks
 
Set the format of the cell to text prior to assigning it a value.
For example,

Worksheet.Cells(outrow, 3).NumberFormat = "@"
Worksheet.Cells(outrow, 3) = strTest



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Chip said:
Set the format of the cell to text prior to assigning it a value.
For example,

Worksheet.Cells(outrow, 3).NumberFormat = "@"
Worksheet.Cells(outrow, 3) = strTest
It solved the problem.

Thanks
 
Back
Top