Solved

string "0E302" turns into 0.00E+00 when copied to another cell

Posted on 2014-04-24
3
254 Views
Last Modified: 2014-04-24
I have a string array with shows "0E302" as the value.  However when I do a Sheets
("MergeRecords").Cells(n, 3) = CStr(myArray(2)) 

Open in new window

it ends up on the other sheet as 0.00E+00.

Here is the code to get the information into the array
myArray = Split(ResidentID, "-")

Open in new window


they all seem to be strings at this point.  Anyone have any ideas.

thanks
0
Comment
Question by:mgmhicks
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 250 total points
ID: 40020496
Try using:
Sheets("MergeRecords").Cells(n, 3).Value = "'" & myArray(2)

Open in new window

0
 
LVL 51

Assisted Solution

by:Rgonzo1971
Rgonzo1971 earned 250 total points
ID: 40020511
Hi,

Or format the cell as Text

Sheets("MergeRecords").Cells(n, 3).NumberFormat = "@"
Sheets("MergeRecords").Cells(n, 3) = myArray(2)

Open in new window

Regards
0
 

Author Closing Comment

by:mgmhicks
ID: 40020529
Both Solutions worked great
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question