Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy workbook, don't copy macro | Excel Discussion (Misc queries) | |||
macro copy | Excel Discussion (Misc queries) | |||
how to count/sum by function/macro to get the number of record to do copy/paste in macro | Excel Programming | |||
COPY MACRO | Excel Programming |