Correct Scientific copied numbers

JTL9161

Well-known Member
Joined
Aug 29, 2012
Messages
567
Office Version
  1. 365
Platform
  1. Windows
I run a macro to screen scrape data from our companies database (IBM-PComm)

Some of the data contains numbers and a letter, for example 30E82. This number though is copied into my spreadsheet as scientific format and shows like this 3.00E+92. When I try to re-format it to a number it then shows
300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.00

<colgroup><col width="696"></colgroup><tbody>
</tbody>


Is there a way to get this to either copy from our database as 30E82 or a way to convert it?


Thank you,
James
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Presumably the data comes from a text file (perhaps CSV). You need to treat the data as text. It would be helpful if you posted the VBA code, at least the part that reads the data and stores it into an Excel cell. But the latter should look something like this.
Code:
Dim s As String
.... input into s ....
Range("A1").NumberFormat = "@"    ' Format as Text
Range("A1").Value2 = s
 
Upvote 0

Forum statistics

Threads
1,214,925
Messages
6,122,303
Members
449,078
Latest member
nonnakkong

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top