#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Macro

I am importing information from an AS400 to an Excel spreadsheet. The date
imports as 20080528. Is it possible to write a macro that will insert the
date markers (/) at set intervals?

I have never written a macro but do understand the theory behind them. Any
help would be appreciate.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 638
Default Macro

On May 29, 12:54*pm, Still learning@work
wrote:
I am importing information from an AS400 to an Excel spreadsheet. *The date
imports as 20080528. *Is it possible to write a macro that will insert the
date markers (/) at set intervals?

I have never written a macro but do understand the theory behind them. *Any
help would be appreciate.


If you are wanting to do this after the import, I would just use a
formula instead of a macro.
There are a few different ways to do this, but assuming 20080528 is in
E2.
=LEFT(E2,4) &"/" & MID(E2,5,2) & "/" & RIGHT(E2,2)
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Macro

How do I apply this formula to convert the entire column?
"JW" wrote:

On May 29, 12:54 pm, Still learning@work
wrote:
I am importing information from an AS400 to an Excel spreadsheet. The date
imports as 20080528. Is it possible to write a macro that will insert the
date markers (/) at set intervals?

I have never written a macro but do understand the theory behind them. Any
help would be appreciate.


If you are wanting to do this after the import, I would just use a
formula instead of a macro.
There are a few different ways to do this, but assuming 20080528 is in
E2.
=LEFT(E2,4) &"/" & MID(E2,5,2) & "/" & RIGHT(E2,2)

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 638
Default Macro

On May 29, 2:17*pm, Still learning@work
wrote:
How do I apply this formula to convert the entire column?



"JW" wrote:
On May 29, 12:54 pm, Still learning@work
wrote:
I am importing information from an AS400 to an Excel spreadsheet. *The date
imports as 20080528. *Is it possible to write a macro that will insert the
date markers (/) at set intervals?


I have never written a macro but do understand the theory behind them. *Any
help would be appreciate.


If you are wanting to do this after the import, I would just use a
formula instead of a macro.
There are a few different ways to do this, but assuming 20080528 is in
E2.
=LEFT(E2,4) &"/" & MID(E2,5,2) & "/" & RIGHT(E2,2)- Hide quoted text -


- Show quoted text -


Just drag the formula down as far as needed. It's references will
automatically change.
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
AutoRun Macro with a delay to give user the choice to cancel the macro wanderlust Excel Programming 2 September 28th 07 04:09 PM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
Macro not showing in Tools/Macro/Macros yet show up when I goto VBA editor [email protected] Excel Programming 2 March 30th 07 07:48 PM
Need syntax for RUNning a Word macro with an argument, called from an Excel macro Steve[_84_] Excel Programming 3 July 6th 06 07:42 PM
Start Macro / Stop Macro / Restart Macro Pete[_13_] Excel Programming 2 November 21st 03 05:04 PM


All times are GMT +1. The time now is 07:08 PM.

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"