Help with financial analysis
Hi,
Does anyone know where I can download a plug & play spreadsheet for finanancial anlaysis of p&l, balance sheet, working cap data etc.
Would be most grateful
Joe
Function COUNT_ACROSS_SHEETS()
Application.Volatile
SUMMER = 0
COUNTER = 0
For Each SHT In Worksheets
With SHT
If SHT.Cells(1, 1) <> 0 Then
SUMMER = SUMMER + SHT.Cells(1, 1)
COUNTER = COUNTER + 1
End If
End With
Next SHT
COUNT_ACROSS_SHEETS = SUMMER / COUNTER
End Function
Jaime proposed VB, because, I guess, he knew an array formula will not work across sheets. So please use his code. What follows is just for fun.
My example uses 4 consecutive sheets instead of 31.
On some sheet,
in A1 enter: =IF(ROW()>$C$3,"",INDIRECT("Sheet"&ROW()&"!"&$C$4)) [ copy down as far as needed ]
in column B from B1 on enter the following labels: "Start","End","N","Cell","Range","Result".
in column C from C1 on enter the following labels: "Sheet1","Sheet4", C4.
in C4 enter: =MID(C2,6,LEN(C2)-5)+0
in C5 enter: ="A1:A"&C4
in C6 array-enter: =AVERAGE(IF(INDIRECT(C5),INDIRECT(C5))) [ in order to array-enter a formula, you need to hit CONTROL+SHIFT+ENTER at the same time ]
The array-formula in C6 is an abridged version of the array-formula: =AVERAGE(IF(INDIRECT(C5)<>0,INDIRECT(C5)))
The whole setup, including everything, should look as:
{9,"Start","Sheet1";7,"End","Sheet4";2,"N","C12";0,"Cell",4;"","Range","A1:A4";"","Result",6}
Aladin
While posting, I switched the values of B3:C3 and B4:C4, an action that led to some inaccurate references. Hence, corrections.
in A1 enter: =IF(ROW()>$C$4,"",INDIRECT("Sheet"&ROW()&"!"&$C$3)) [ copy down as far as needed ]
in column B from B1 on enter the following labels: "Start","End","Cell","N","Range","Result".
in column C from C1 on enter the following labels: "Sheet1","Sheet4", C12.
{9,"Start","Sheet1";7,"End","Sheet4";2,"Cell","C12";0,"N",4;"","Range","A1:A4";"","Result",6}