PDA

View Full Version : Solved: Extract and convert Data to new sheet



tlchan
05-31-2008, 07:50 PM
Hi all VBA experts,

I have a project task to export the new database to existing database of different file format. However the main problem I'm facing the is the SSE No in the new database is in the form of alphnumeric with specific no of charaters but the old database are in numeric only.


In order to export the new database to existing, I need to convert the SSE No from alphanumeric to numeric and copy to new sheet before exporting. The converted SSE No I required is only in numeric without any preceding zero or numbers. e.g ENV010980001 to become 1. Attached sample of working file. :dunno

mikerickson
05-31-2008, 10:12 PM
To convert the strings into numbers.

Select the column.
Use TextToColumns with a fixed width break after the 8th character.
Choose not to import the left column.
The alphanumeric code strings will be replaced with numbers.

I hope this helps.

tlchan
05-31-2008, 10:32 PM
Thanks mikerickson for your quick rescue to my project. Now I'm able to meet my dateline on the project by tomorrow. :friends:

Thank you

mdmackillop
06-01-2008, 02:04 AM
An alternative for individual cells
=RIGHT(D4,4)*1