Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Import txt file

I have a macro to import data from a text file (csv with
extension txt), with dates as dd/mm/yyyy in the first
column and values in the others.

When I run it, all the data is imported properly except
that sum of the dates get the date format in the cell and
sum stay as standard. If I use German regional settings
(which I usually do), the dates with date cell format also
turn to mm/dd/yyyy.

Does anyone have a clue what the problem might be and how
to overcome?

Thanks
Hasan



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 473
Default Import txt file

Hasan Cansü wrote:
I have a macro to import data from a text file (csv with
extension txt), with dates as dd/mm/yyyy in the first
column and values in the others.

When I run it, all the data is imported properly except
that sum of the dates get the date format in the cell and
sum stay as standard. If I use German regional settings
(which I usually do), the dates with date cell format also
turn to mm/dd/yyyy.


I suggest you record a macro while doing File / Open on this file.
The import wizard should appear.
Specify Delimited / Next / Comma / Next
Select the first column and specify Date: DMY / Finish

Then copy the relevant part of the recorded macro into your macro.

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - reply in newsgroup

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I import text file of cash flow to excel file then use formula Bumpa Excel Discussion (Misc queries) 2 May 28th 10 04:22 PM
import file so that it is a actual csv file, no excel cell version broncoburt New Users to Excel 1 November 21st 09 09:09 PM
import data from txt file to an existing excel file shaji Excel Discussion (Misc queries) 1 September 12th 09 04:15 PM
Would Like to Automate Batch File Creation and Text FIle Import socrtwo Excel Discussion (Misc queries) 2 August 18th 06 03:54 PM
Get External Data, Import Text File, File name problem Scott Riddle Excel Programming 1 July 11th 03 05:40 PM


All times are GMT +1. The time now is 03:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"