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


I currently have data that I am trying to format for importing into M
Access. For my Access database I need each record to have a DCR numbe
(number in column A). The macro I need is one that goes to a cel
location (A1), stores the cell contents and evaluates if the next cel
below in the same column is blank (A2). It also needs to evaluate i
the immediate column to the right is populated (B2). If thes
conditions are met, the program needs to copy the stored DCR numbe
into this cell (A2). It needs to then move down and store the content
of the next cell (A2) or loop through the procedure as listed above. I
the macro encounters a new DCR number in column A it needs to store i
and move through the procedures as listed above. I need to accomplis
this same process for other columns of data. (See Attached Text File

+-------------------------------------------------------------------
|Filename: Test Data.txt
|Download: http://www.excelforum.com/attachment.php?postid=3835
+-------------------------------------------------------------------

--
mcertin
-----------------------------------------------------------------------
mcertini's Profile: http://www.excelforum.com/member.php...fo&userid=2715
View this thread: http://www.excelforum.com/showthread.php?threadid=46857

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

dim c as range

for each c in activesheet.Range("A:A") if c.offset(1,0) = "" and not
c.offset(1,1) = "" Then
c.offset(1,0).value = c.value
next

"mcertini" wrote:


I currently have data that I am trying to format for importing into MS
Access. For my Access database I need each record to have a DCR number
(number in column A). The macro I need is one that goes to a cell
location (A1), stores the cell contents and evaluates if the next cell
below in the same column is blank (A2). It also needs to evaluate if
the immediate column to the right is populated (B2). If these
conditions are met, the program needs to copy the stored DCR number
into this cell (A2). It needs to then move down and store the contents
of the next cell (A2) or loop through the procedure as listed above. If
the macro encounters a new DCR number in column A it needs to store it
and move through the procedures as listed above. I need to accomplish
this same process for other columns of data. (See Attached Text File)


+-------------------------------------------------------------------+
|Filename: Test Data.txt |
|Download: http://www.excelforum.com/attachment.php?postid=3835 |
+-------------------------------------------------------------------+

--
mcertini
------------------------------------------------------------------------
mcertini's Profile: http://www.excelforum.com/member.php...o&userid=27151
View this thread: http://www.excelforum.com/showthread...hreadid=468578


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
Copy workbook, don't copy macro CongroGrey Excel Discussion (Misc queries) 1 June 13th 08 04:56 PM
macro copy Pammy Excel Discussion (Misc queries) 1 April 28th 07 03:48 PM
how to count/sum by function/macro to get the number of record to do copy/paste in macro tango Excel Programming 1 October 15th 04 01:16 PM
COPY MACRO PCOR Excel Programming 7 January 6th 04 01:59 PM


All times are GMT +1. The time now is 02:51 PM.

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"