View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
MyVeryOwnSelf MyVeryOwnSelf is offline
external usenet poster
 
Posts: 213
Default Retraction (was: Addition Formula)

I take this back ... got to think about it some more.

Sorry about the false start.


I am trying to add a number in one cell to another cell which
contains a YTD total. How to i create this YTD total w/o creating
another blank cell

Example
Cell 1 = number changes weekly
Cell 2 = number here should add Cell 1 for a YTD total


Here's one way using Excel 2003.

In Sheet1, the weekly entry is in B2 and the YTD total will be in C2.

First, in
Tools Options Calculation
check the "Iteration" box to allow circular references.

The approach uses Sheet2 as a workspace. In Sheet2 make these entries:

In A2:
=IF(OR(A1="",A1=TODAY()),"",IF(A2="",TODAY(),A2))

In B2:
=IF(A2=TODAY(),Sheet1!$B$2,B2)

Then copy A2:B2 down for 52 rows (a year of weeks).

Format column A as dates.

Then in A1 put today's date.

Finally, in Sheet1!B3 put
=SUM(Sheet2!B:B)

Here's how it works. Sheet2 keeps a running list of entries. This is
useful in locating data-entry errors after the fact. Sheet2 captures
at most one number from Sheet1!$B$2 per day: the last entered that
day. It starts tomorrow. (You could use WEEKNUM(...) in the test
instead of just TODAY() if you want to be stricter about when the data
is entered).