Good Afternoon all,
I am quite new to macro's, but am trying to do a simple task of adding cells from 2 different worksheets into a third.
So I want Cell B3 of sheet1 added to Cell B4 of Sheet2 and the total to appear in Cell B3 of Sheet 3.
The code I have got to work is:
Sub count()
myvalue = Sheets("SHEET1").Range("B3") + Sheets("SHEET2").Range("B4")
Sheets("SHEET3").Range("B3").Value = myvalue
End Sub
This works, but I need to get this method to work for all cells in a range (add each cell from Sheet1 from B4 to U46 inclusive, and Sheet2 B3 to U45 inclusive, to appear in sheet 3 in the range of B4 to U46).
Is it possible to do this by a simple peive of code? or will I have to enter each calculation seperately like:
Sub count()
myvalue = Sheets("SHEET1").Range("B3") + Sheets("SHEET2").Range("B4")
Sheets("SHEET3").Range("B3").Value = myvalue
myvalue = Sheets("SHEET1").Range("B4") + Sheets("SHEET2").Range("B5")
Sheets("SHEET3").Range("B4").Value = myvalue
myvalue = Sheets("SHEET1").Range("B5") + Sheets("SHEET2").Range("B6")
Sheets("SHEET3").Range("B5").Value = myvalue
[****and so on****]
End Sub
this seems to work but would take me ages to input all the different cell calculations.
Any advice would be warmly received.
Ian.
Bookmarks