I have an Excel table with 4 000 rows. The data in the columns are numbers but they have been entered as text (from another database). How do I turn a column with 4 000 rows from text format into numbers format so that I can sort the numbers?
I have an Excel table with 4 000 rows. The data in the columns are numbers but they have been entered as text (from another database). How do I turn a column with 4 000 rows from text format into numbers format so that I can sort the numbers?
Just select all and click convert to numbers from Error Checking Drop down
there is a quick fix...
a. put the number 1 in any empty cell other then the column with textnumbers
b. do CTRL+C to copy that cell content
c. select your column(s) with the 4000 textnumbers
d. Choose pastespecial and then in the menu select multiply and press OK
now your numbers will go from text to values again
Pls see attached Pic
MSFT's helpfile suggests a few strategies: https://support.office.com/en-us/art...1-c5bad0f0a885
Originally Posted by shg
I am sorry, it apperas my question was inaccurate. It appears that what looked like numbers (eg 10.60) are actually stored in the Excel column as years in this format. The original number is 10,60. How do I get from the year format back to the original numbers?
Attach a workbook that shows a small sample of data with the problem.
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
Forum Rules (updated August 2023): please read them here.
Here is a sample of the database. When the data was transferred from a database to Excel all the numbers were stored as years in this format. These are boatlengths and I need to sort them so they need to be converted to numbers.
I have no idea what you mean about the data being stored as years, sorry. I think it must be something to do with your locale, as this is what I see:
Excel 2016 (Windows) 32 bit
A B C D E F 1Motorbåt 7.100.00 0.00 0.000 2Motorbåt 0.000.00 0.00 0.000 3Motorbåt 6.20115.00 0.00 0.950 4Motorbåt 9.3020.00 0.00 5.000 5Motorbåt 7.21230.00 0.00 1.700
Sheet: Taulukko1
Is your data coming from a UK or US or other English-speaking locale? How is the data being transferred from the database to Excel? Can you attach a sample of that data?
As AliGW said it is your locale.
Highlight entire range and use Find/Replace "." point with "," comma
Then see what you format tells you.
Following the advice of ibuhary to use the Error Checking drop down Excel informs me that the data is stored as a "two-digit year in a text format date", which I have difficulties understanding. In any case, the choices then available to me from the Error Checkin are to store the number in 19XX or 20XX format, both of which yield a 5-digit number which is of no use to me. The data is coming from a Swedish-speaking locale. I am not able to access the orginal data.
I also cannot see anything relating to "two-digit years", but try this approach - you need to do it 1 column at a time, unfortunately.
1. highlight a column of data
2. Select Data/Text2Columns
3. click Next/Next/Finished
See if that works for you?
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
Can you tell us what kind of data is in these cells, then we could guide you accordingly.
If they are dates, then you need to understand that in Excel dates are stores as "5 Digit Numbers" and its just the format of the cells that will change the way its displayed to the user.
E.g. 43514 is today's date in excel and it can be displayed in many ways including some mentioned below:
Year only as "2019"
Month only as "02"
Day only as "18"
Weekday only as "2" or "Monday"
Whole date as "02/18/2019" or "18-Feb-2019"
So once you convert your text to numbers you need to play further in the format of the cells to get it display what you need.
In case you need any further clarifications pls do not hesitate to buzz....
Thank you all, torachans solution solved the problem, simple and elegant!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks