What is currently in cells A2 and A3?
Formulas or hard-coded values?
If hard-coded values, how are they getting updated.
Have you taken a look at SUMIF or SUMIFS?
If your underlying data has a date field, you should just be able to use that with SUMIF/SUMIFS to dynamically total the value for the previous and current days.