Question : How to automate a task for Excel

Every week on Monday the excel file should present the data for the past week.
Numbers A, B, C, D, E, 1, 2 should be just entered
Numbers 3 and Number 4 based on the Number 1 and Number 2 (Cumulative)


I need a help to create a macro to do:
1. Clear all cells but B17 and B19-----I know how to do that
1. Cut B17 and B19 accordingly
2. Paste special as value back into B17 and B19 accordingly
3.  Make a formula “=B17+B8 “ in cell B17
4. Make a formula  “=B19+B11” in cell B19
Attachments:
 
example picture
example picture
 
 
Original file for demonstation
 

Answer : How to automate a task for Excel

1. Cut B17 and B19 accordingly
2. Paste special as value back into B17 and B19 accordingly

   Application.CutCopyMode = False
   Range("B17").Copy
   Range("B17").PasteSpecial xlPasteValues
   Range("B19").Copy
   Range("B19").PasteSpecial xlPasteValues

3.  Make a formula “=B17+B8 “ in cell B17

     This would be a circular reference, not valid
     you could do:
     Range("B17").value = Range("B17").value + Range("B8").value

4. Make a formula  “=B19+B11” in cell B19

     This would be a circular reference, not valid
     you could do:
     Range("B19").value = Range("B19").value + Range("B11").value

Random Solutions  
 
programming4us programming4us