adding data to one olumn to another

J

john.9.williams

I have two columns of data column a is always the same coloum b get
filled out every week with numerical data for instance

data1 10
data2 9
data3 6
data4 4


at the end of the week i want to add the totals in column b to
another
sheet but every time add the current weeks data to that what has
already been done


i.e


running total


data1 23
data2 78
data3 56


anyone got any ideas this is stumping me

Johny
 
B

Bob Phillips

For i = 2 To Cells(Rows.Count,"A").End(xlUp).Row

FindRow=0
On Error Resume Next
FindRow = Application.Match(Cellws(i,"A").Value
On Error Goto 0
If FindRow = 0 Then

FindRow = Worksheets("Sheet2").Range("A1").End(xlDown).Row + 1
Worksheets(("Sheet2").Cells(FindRow,"A").Value = Cells(i,
"A").Value
End If
Worksheets(("Sheet2").Cells(FindRow,"B").Value = _
Worksheets(("Sheet2").Cells(FindRow,"B").Value + Cells(i,
"B").Value
Next i

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top