Hello Guys,
I have seen similar threads on the forum but none has gotten a final solution.
I would really appreciate your help, My requirement is pretty simple.
so this code, Range("C" & Rows.Count).End(xlUp).Offset(1).Row -> Is supposed to give me the last available row in column C which it did in CellC39
But, Cell C38 to F38 holds data that is supposed to be the total sum of all the data above.
So my requirement is to get Macro to skip Cell C38 and copy the first data into Cell C7.
For each data output, I want the code to continue from C7, C8, C9, C10 up till Cell C37.
Current Problem is, I have tried all possible solutions but I cant find a fix.
kidly find below my complete code.
**Sheets Details**
Macro copies some data from the "Daily Expense" Sheet
and save into the "Month_Summary" Sheet
**My Code**
Sub dailydata_Expense()
' Allow macros to edit the worksheet, but not the user.
' - user can still remove the worksheet protection by hand if they have the password.
ActiveSheet.Protect Password:="@army21", UserInterfaceOnly:=True
ws_output = "Month_Summary"
next_row = Sheets(ws_output).Range("C" & Rows.Count).End(xlUp).Offset(1).Row
Sheets(ws_output).Cells(next_row, 3).Value = Range("Date").Value
Sheets(ws_output).Cells(next_row, 4).Value = Range("Cash_Spent").Value
Sheets(ws_output).Cells(next_row, 5).Value = Range("Pos_Spent").Value
Sheets(ws_output).Cells(next_row, 6).Value = Range("Total_Expense").Value
End Sub
I have seen similar threads on the forum but none has gotten a final solution.
I would really appreciate your help, My requirement is pretty simple.
so this code, Range("C" & Rows.Count).End(xlUp).Offset(1).Row -> Is supposed to give me the last available row in column C which it did in CellC39
But, Cell C38 to F38 holds data that is supposed to be the total sum of all the data above.
So my requirement is to get Macro to skip Cell C38 and copy the first data into Cell C7.
For each data output, I want the code to continue from C7, C8, C9, C10 up till Cell C37.
Current Problem is, I have tried all possible solutions but I cant find a fix.
kidly find below my complete code.
**Sheets Details**
Macro copies some data from the "Daily Expense" Sheet
and save into the "Month_Summary" Sheet
**My Code**
Sub dailydata_Expense()
' Allow macros to edit the worksheet, but not the user.
' - user can still remove the worksheet protection by hand if they have the password.
ActiveSheet.Protect Password:="@army21", UserInterfaceOnly:=True
ws_output = "Month_Summary"
next_row = Sheets(ws_output).Range("C" & Rows.Count).End(xlUp).Offset(1).Row
Sheets(ws_output).Cells(next_row, 3).Value = Range("Date").Value
Sheets(ws_output).Cells(next_row, 4).Value = Range("Cash_Spent").Value
Sheets(ws_output).Cells(next_row, 5).Value = Range("Pos_Spent").Value
Sheets(ws_output).Cells(next_row, 6).Value = Range("Total_Expense").Value
End Sub