View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
RagDyeR RagDyeR is offline
external usenet poster
 
Posts: 3,572
Default Adding calculated value to previous cell

If the day numbers are in A2 to A32, and the daily values are in B2 to B32,
where do you want the formula that totals the daily values?

You say in the cell for day 28.
Are you talking about A29 or maybe C29?

If you're entering values in Column B, how can you have the value show for
day 28 with the totals for day 1 to day 28?

If you use Column C, and you enter a date in A1, you could enter this
formula in C29 (last day of shortest month):

=IF(A29=32-DAY(A$1-DAY(A$1)+32),3100-SUM($B$2:B29),"")

And copy down to C32 (last day of longest month).

Then, you'll see only *one* row displaying the formula results.
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"electricbluelady" wrote in
message ...
Hi everyone,
I have a spreadsheet numbered from 1-31. This represents the maximum of 31
days in a month. However, all months do not contain 31 days. This is an
example of what I am working with: (day and value columns)

1 100
2 100
3 100
. 100
. 100
. 100
28 100
29 0
30 0
31 0

Total 3100 (fixed constant-no matter if there are 28, 29, 30, or 31 days
in
the month).

This example is for February (non-leap year) and the month has 28 days.
How
do I calculate the 28th day to equal the total of (3100 - the sum of
values
from day 1- day 28?) and appear in the cell for day 28? (leaving the cells
for 29, 30, and 31 blank).

(this would need to work also for days 29, 30, and 31).


--
Thank you all again, Regards!
Electricbluelady