Formatting Numbers Imports

  • Thread starter Thread starter u473
  • Start date Start date
U

u473

I import a Cost Code which is structured as such : - ##-##-## (with an
existing unecessary leading hyphen but that is the way it is)

Unforturnately, MID(ActiveCell,4,8) for 09-04-50 returns a date
formatted as 9/4/1950 instead of the desired format as 09-04-50.
I tried to format the column as TEXT before the import, or MID with
TEXT() in my code without being able to fix the problem.
The solution is probably simple but I don't have it.
Help appreciated.
Celeste
 
Rename the file to a .txt file before importing. This should start a wizard in which you can define the types of inputs.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

|I import a Cost Code which is structured as such : - ##-##-## (with an
| existing unecessary leading hyphen but that is the way it is)
|
| Unforturnately, MID(ActiveCell,4,8) for 09-04-50 returns a date
| formatted as 9/4/1950 instead of the desired format as 09-04-50.
| I tried to format the column as TEXT before the import, or MID with
| TEXT() in my code without being able to fix the problem.
| The solution is probably simple but I don't have it.
| Help appreciated.
| Celeste
 
Thank you for the advice but I wanted to do my import through VBA, not
through the import Wizard.
Celeste.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top