Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Please help me with the following code:
Sub looprange() x = ActiveCell.Row y = ActiveCell.Column 'Have y start at column 2 y = 2 'Loop until a blank row is found Do While Cells(y, 2).Value < "" Column(y, 2).Value = Cells(x, 14).Value 'increase the value of x by 1 to act on the next row x = x + 1 Loop End Sub Sources data as follows: Column L Column M Column N Column O Account Number Account Number Contract Date Contract Date Account Number xxx-xxx-xxxx Contract Date 2001-02-19 12:00AM Account Number xxx-xxx-xxxx Contract Date 2000-12-22 12:00AM Account Number xxx-xxx-xxxx Contract Date 2001-05-28 12:00AM Account Number xxx-xxx-xxxx Contract Date 2002-03-21 12:00AM Account Number xxx-xxx-xxxx Contract Date 2002-05-22 12:00AM What I need is that the heading in Column M " Account Number " will be automatically pasted into the whole column L when I run Macro, and column O heading " contact date " will does the same thing -- paste into whole column N until it reach the blank cells, and so on. Could somebody help me to fix the code which I did--it seems that it doesn't work. I would appreciate your help. Yorson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Advancing outer Loop Based on criteria of inner loop | Excel Programming | |||
Loop Function unable to loop | Excel Programming | |||
Problem adding charts using Do-Loop Until loop | Excel Programming | |||
How do I create a For loop within a For loop? | Excel Programming | |||
HELP!!!! Can't stop a loop (NOT an infinite loop) | Excel Programming |