Vote count: 0 Here are 3 worksheets. '//i.stack.imgur.com/KeULk.png ' //i.stack.imgur.com/w9wa7.png ' //i.stack.imgur.com/KLeUl.png Case: I want to sum the days for each person. The result is displayed on worksheet-report. The days store in worksheet-day. The day is not fixed. The range of the days should be according to row: that person row in worksheet-day column :Worksheets("button").Cells(1, 2 ) to Worksheets("button").Cells(2, 2) Here is my code: Sub gg() row = Worksheets("report").Range("C" & Rows.Count).End(xlUp).row Row2 = Worksheets("day").Range("C" & Rows.Count).End(xlUp).row Dim g As Range 'the range for sum Dim row999 As Integer 'store the selected row index For k = 2 To Row2 'ch...
ادامه مطلب