Copy sum of values from one sheet to another
Closed
bj
-
19 Oct 2010 à 12:59
venkat1926 Posts 1863 Registration date Sunday 14 June 2009 Status Contributor Last seen 7 August 2021 - 20 Oct 2010 à 21:26
venkat1926 Posts 1863 Registration date Sunday 14 June 2009 Status Contributor Last seen 7 August 2021 - 20 Oct 2010 à 21:26
Related:
- Copy sum from one sheet to another
- How to copy data from one excel sheet to another - Guide
- Excel move data from one sheet to another - Guide
- Excel hyperlink to another sheet - Guide
- How to change google sheet from left to right - Guide
- Little alchemy cheat sheet - Guide
3 responses
venkat1926
Posts
1863
Registration date
Sunday 14 June 2009
Status
Contributor
Last seen
7 August 2021
811
20 Oct 2010 à 06:21
20 Oct 2010 à 06:21
quote
sLastRow = oSheet1.Cells(oBook1.Worksheets(1).rows.count, "O").end(Excel.XlDirection.xlUp)
dLastRow = oSheet2.Range("A6").End(Excel.XlDirection.xlToRight)
dLastRow.Copy(sLastRow)
unquote
Yo;u have not explained what you want to do It is difficult to GUESS what you are thinking to do just from the code statements you have given .please repost
sLastRow = oSheet1.Cells(oBook1.Worksheets(1).rows.count, "O").end(Excel.XlDirection.xlUp)
dLastRow = oSheet2.Range("A6").End(Excel.XlDirection.xlToRight)
dLastRow.Copy(sLastRow)
unquote
Yo;u have not explained what you want to do It is difficult to GUESS what you are thinking to do just from the code statements you have given .please repost
Hi Venkat,
I have sheet1 which has a column "O". I need to sum the values in this coulumn.
I have sheet2 which has row index "6". I need to append the sum (calculated earlier in sheet1 ) to row 6 of sheet2. Row 6 already has some values. I need to append the sum of values in Column "O" in sheet1 to sheet2. And this I need to do for every month.
Please give some pointers on the same.
Thanks.
I have sheet1 which has a column "O". I need to sum the values in this coulumn.
I have sheet2 which has row index "6". I need to append the sum (calculated earlier in sheet1 ) to row 6 of sheet2. Row 6 already has some values. I need to append the sum of values in Column "O" in sheet1 to sheet2. And this I need to do for every month.
Please give some pointers on the same.
Thanks.
venkat1926
Posts
1863
Registration date
Sunday 14 June 2009
Status
Contributor
Last seen
7 August 2021
811
20 Oct 2010 à 21:26
20 Oct 2010 à 21:26
my sample workbook with sheet1 and sheet2 download from this webpage
http://www.speedyshare.com/files/24796632/BJ.xls
I ran this macro (the macro is in standard module of this workbook)
see whether you got what you want.(see sheet2cell O6) You said every month. what does that signify. do you have different workbook for different month
use the same macro
http://www.speedyshare.com/files/24796632/BJ.xls
I ran this macro (the macro is in standard module of this workbook)
see whether you got what you want.(see sheet2cell O6) You said every month. what does that signify. do you have different workbook for different month
use the same macro
Sub test()
Dim j As Double, r As Range
With Worksheets("sheet1")
Set r = Range(.Range("O2"), .Range("O2").End(xlDown))
'MsgBox r.Address
j = WorksheetFunction.Sum(r)
'MsgBox j
End With
With Worksheets("sheet2")
.Cells(6, "O") = j
End With
End Sub