Change Scientific Notation from selected column

mictlantecuhtli

New Member
Joined
Oct 25, 2021
Messages
10
Office Version
  1. 365
Platform
  1. Windows
Hi guys, I have another question for you,

I have an excel file, and on one of the file columns I have these numbers, some are in number format but it has some scientific, I need a macro to run on the selected column and convert scientific to text

Thank's in advanced

Greetings from México
 

Attachments

  • celdas.png
    celdas.png
    7.5 KB · Views: 12

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
The cells should be formatted as TEXT to begin with.
If importing such data from an external file, you can use the legacy import wizard and make sure the Data is brought in as Text.

If, as it sounds you have the data already in Excel, you can convert "numbers" to text using the Text to Columns tool, found on the DATA Ribbon, built in and select Text in the Third Window
 
Upvote 0
If it is always the same column, just record the steps of Text-to-Columns for that column.
If it changes columns, the macro will have to be changed for Selected Column and First Row of selected Column, for destination.
However, this should be a one-and-done process. If there is a data entry issue, it is that the cells are left to be GENERAL before data entry. Excel is not a Database, but when attempted to use as such, the database principle of assigning the data type for a field MUST be followed.
If the Data is being imported, the Import method needs to be corrected or a different method all together should be used.
 
Upvote 0
Say for example, Column E is the column to "fix", the VBA code would be:
VBA Code:
Sub TTC_TEXT_COL_E()
    Columns("E:E").Select
    Selection.TextToColumns Destination:=Range("E1"), DataType:=xlDelimited, _
        TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
        Semicolon:=False, Comma:=False, Space:=False, Other:=False, FieldInfo _
        :=Array(1, 2), TrailingMinusNumbers:=True
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,011
Messages
6,122,677
Members
449,092
Latest member
tayo4dgacorbanget

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