View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Max
 
Posts: n/a
Default Calculating a YTD figures from changing monthly figure.

Here's an example set up to make it dynamic ..
(wo getting into circular ref problems <g)

A sample construct available at:
http://www.savefile.com/files/8312983
Monthly Figures n Dynamic YTD.xls

Source input table for the year is in E1:P5
E1:P1 houses first of month dates, formatted as: mmm-yy (Jan-06, Feb-06 ..)
Monthly figures data is input within E2:P5

In B1 is a data validation droplist,
created via clicking Data Validation
Allow: List
Source: =$E$1:$P$1

B1 allows the selection of the current month

In C1: YTD (a label)

Put in B2:
=IF($B$1="","",HLOOKUP($B$1,$E$1:$P$5,ROW(),0))

Put in C2:
=IF(OR($B$1="",B2=0),"",SUM(OFFSET(E2,,,,MATCH($B$ 1,$E$1:$P$1,0))))

Select B2:C2, copy down to C5

B2:B5 will return the figures for the month selected in B1 from the source
input table in E1:P5. C2:C5 will return the corresponding YTD figures. The
sample chart plotted on $A$1:$C$5 will also update accordingly.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"rGrant" wrote:
Mth Apr YTD
Co A 2 53
Co B 16 32
Co C 46 103
Co D 10 89
Using these figures I was putting the formula =(B2+C2) where the figure 53
is. I solved the Circular reference I created and this worked fine. However
things go wrong when I put =(B3+C3) where 32 is located. Everytime I update
B2, where 2 is located it automatically adds another16 to C3!! Each row is a
distinct set of figures although I need to create graphs, total and calculate
percentages - hence in this format.
--
rGrant