seek next line

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i have a workbook with couple sheets. sheet1 has info that gets "empty" out
every day (sales) on page2 i have dates down colum a and need the sales
from sheet1 to be carried over.

for this ill need a macro to copy info from sheet1 cell c15 to the next open
cell down ward in colum a. i allready have a macro that print and clear
the info enterd on a dayly basis.
 
Hi,
I'm not really sure what you wish to do.

Probably along these lines?:

curRow = 15
while Worksheets("sheet1").Cells(curRow,3)<>""
Worksheets("sheet2").Cells(curRow,1) = Worksheets("sheet1").Cells(curRow,3)
curRow = curRow+1
wend


This should copy all cells from C15 in sheet 1 (and downwards) to column A
in sheet 2.

Hope this helped.
 
on sheet1 cell c15 ppl enter the sales for the day (along with some other
info on other cells. those then calculate the usage of items etc) i only
need cell c15 from sheet on to be copied to sheet2 colum d downward

sheet to i got



a b c d
sales projection
date day last yr sales this yr sales
1 01/07/07 mon $1.20 ****
2 02/07/07 tues $1.20 ****
3 03/07/07 wed $1.20 ****
4 04/07/07 thur $1.20 ****
5 05/07/07 frid $1.20 ****
 
dim c15
c15 = Worksheets("Sheet1").Cells("C15")
for curRow = 1 to 10 do 'Adjust this as needed...
Worksheets("Sheet2").Cells(curRow,4) = c15
next curRow


Hi,
I'm writing this code offhand, I'm not testing it. I expect that there'd be
syntax errors, but you should be able to follow the general logic and
fix/modify it as required.

Good luck,
Vivek.
 
Back
Top