LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 360
Default How can I automatically format a column as it is imported?

You can use the named range produced when you add the query table to
define the range to loop within:

Sub way()
Dim c As Range
Dim bgn As Long
Dim nd As Long

For Each c In Sheet1.Range("UPS_CSV_EXPORT").Columns(1) 'adjust range
as required
c.Value = _
Mid(c.Text, 5, 2) & "/" & Mid(c.Text, 7, 2) & "/" & Mid
(c.Text, 3, 2)
Next c

Sheet1.Range("UPS_CSV_EXPORT").Columns(1).NumberFo rmat = "mm/dd/yy;@"

End Sub

Cliff Edwards
 
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
scroll automatically as data is imported into a spreadsheet Light Meter Reader Excel Discussion (Misc queries) 1 February 26th 09 11:36 PM
automatically updating imported statistics Walter New Users to Excel 1 February 24th 08 03:16 PM
Automatically modifying imported reports waterskyle Excel Discussion (Misc queries) 1 December 7th 05 11:37 AM
How do I format a column to automatically make it a negative numbe Kathy Excel Worksheet Functions 1 January 25th 05 03:15 AM
How to automatically adapt column width with XML format? Francesco Sblendorio Excel Programming 2 June 22nd 04 02:47 PM


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

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

About Us

"It's about Microsoft Excel"