Hi
I need my code to add together a range of cells from one sheet and place the answer onto another sheet. this is what Ive done so far but am stuck on getting the code to sum the values. any help will be rewarded with a big thanks![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Sheets("Monthly Report ").Select
Dim rngDate As Range, rngFound As Range
Dim aDate As Date, Shift As String
aDate5 = Sheet1.Cells(2, 2).Value
Shift5 = Sheet1.Cells(4, 2)
Set rngDate5 = Range("d3:bt3")
Set rngFound5 = rngDate5.Find(What:=aDate5)
If Not rngFound5 Is Nothing Then
'True is selection by check box eg true = night shift
If Shift = "True" Then
rngFound5.Offset(52).Select
Selection.Offset(, 1).Select
Else
rngFound5.Offset(52).Select
End If
End If
Selection = Sum("N17+N30+N43+N56+N69+N82+N95+N108+N121+N134+N147+N160+N173")
Sheets("Report").Select
Range("E4").Select
End Sub
I need my code to add together a range of cells from one sheet and place the answer onto another sheet. this is what Ive done so far but am stuck on getting the code to sum the values. any help will be rewarded with a big thanks
Sheets("Monthly Report ").Select
Dim rngDate As Range, rngFound As Range
Dim aDate As Date, Shift As String
aDate5 = Sheet1.Cells(2, 2).Value
Shift5 = Sheet1.Cells(4, 2)
Set rngDate5 = Range("d3:bt3")
Set rngFound5 = rngDate5.Find(What:=aDate5)
If Not rngFound5 Is Nothing Then
'True is selection by check box eg true = night shift
If Shift = "True" Then
rngFound5.Offset(52).Select
Selection.Offset(, 1).Select
Else
rngFound5.Offset(52).Select
End If
End If
Selection = Sum("N17+N30+N43+N56+N69+N82+N95+N108+N121+N134+N147+N160+N173")
Sheets("Report").Select
Range("E4").Select
End Sub