G
Guest
I have a spreadsheet that I need to take data from two columns and import
them into a seperate file. I will need to do this often, as the 1st
spreadsheet gets updated daily. And my final product is a monthly total. The
data I need is on a worksheet titled Totals(there's 3 sheets to the
workbook).
Here's my problem. The original data is not always located in the same cell
for example it could look like this one day:
Column B Column K
Row 24 Machine # Total
Row 25 0001 356
Row 26 0002 485
Row 27 0003 569
And the next day
Column B Column K
Row 24 Machine # Total
Row 25 0003 239
Row 26 0001 358
Row 27 0002 302
The machine #'s aren't committed to a certain row number, it's
auto-generated as a report, so I can't do anything about this, but the column
numbers will stay the same
My final product will be a monthly log sheet that will look like this:
Column A Column B
Row 01 Machine # Monthly Total
Row 02 0001 2356
Row 03 0002 3485
Row 04 0003 5569
So my macro needs to search down the row for the appropriate Machine
#(within a range of rows) and when it finds it return the value from Column K
into my Column B.
My VB is a little fuzzy, so excuse the mistakes but I think my format will
need to be somethign like
IF B25(Workbook, Worksheet) = A2 then B2 = K25(Workbook, worksheet) + B2
Else, Nextrow
Am I thinking along the right line?
Also, if you could tell me what my macro should really be, I'd appreciate it.
Also, will I need to do this update of my monthly report everyday? And will
the filename I'm drawing from need to be the same each time, or can I select
the file to draw from? (is that confusing?)
THANK-YOU
Any help is greatly appreciated, I'm having trouble finding all my answers
by looking thru help files.
them into a seperate file. I will need to do this often, as the 1st
spreadsheet gets updated daily. And my final product is a monthly total. The
data I need is on a worksheet titled Totals(there's 3 sheets to the
workbook).
Here's my problem. The original data is not always located in the same cell
for example it could look like this one day:
Column B Column K
Row 24 Machine # Total
Row 25 0001 356
Row 26 0002 485
Row 27 0003 569
And the next day
Column B Column K
Row 24 Machine # Total
Row 25 0003 239
Row 26 0001 358
Row 27 0002 302
The machine #'s aren't committed to a certain row number, it's
auto-generated as a report, so I can't do anything about this, but the column
numbers will stay the same
My final product will be a monthly log sheet that will look like this:
Column A Column B
Row 01 Machine # Monthly Total
Row 02 0001 2356
Row 03 0002 3485
Row 04 0003 5569
So my macro needs to search down the row for the appropriate Machine
#(within a range of rows) and when it finds it return the value from Column K
into my Column B.
My VB is a little fuzzy, so excuse the mistakes but I think my format will
need to be somethign like
IF B25(Workbook, Worksheet) = A2 then B2 = K25(Workbook, worksheet) + B2
Else, Nextrow
Am I thinking along the right line?
Also, if you could tell me what my macro should really be, I'd appreciate it.
Also, will I need to do this update of my monthly report everyday? And will
the filename I'm drawing from need to be the same each time, or can I select
the file to draw from? (is that confusing?)
THANK-YOU
Any help is greatly appreciated, I'm having trouble finding all my answers
by looking thru help files.