View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
JLatham JLatham is offline
external usenet poster
 
Posts: 3,365
Default Automatically enter a percent for each month of the year.

=OFFSET(A2,0,MONTH(A20)-1)/SUM(A2:OFFSET(A2,0,MONTH(A20)-1))
put that into A19 and you should get the March total as a percentage of the
totals from January through March (assuming date in A20 is a day in March).

That will give a #DIV/0! error if you've not entered any values into row 2,
so you may want to modify that to 'hide' the error situation, change formula
in A19 to:
=IF(ISERROR(OFFSET(A2,0,MONTH(A20)-1)/SUM(A2:OFFSET(A2,0,MONTH(A20)-1))),"",OFFSET(A2,0,MONTH(A20)-1)/SUM(A2:OFFSET(A2,0,MONTH(A20)-1)))

If you want the value in A19 to be the percentage of total sales for the
entire year, then:
=OFFSET(A2,0,MONTH(A20)-1)/SUM(A2:L2)
Might be useful as an added computation somewhere on your sheet - you could
use a different cell from A20 to just type in a date to see the percentage
for a given month when the year's totals have all been entered.


"Jman" wrote:

In A1 thru L1 i have months: A1=Jan, B1=Feb, C1=Mar etc
In A2 thru L2 will be total for each month.


In A19 i have a percentage ex "34%" that varies up and down every day..
In A20 i have "today()" date ex 3-23-08

At the end of the Month i want the percentage in A19 "34%" to automatically
log in to the corresponding month ex. today date 3-23-08 to C2 March

Is there a formula for this?