[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 198
  • Last Modified:

Formula not working on testing

Hi,

I have attached a spreadsheet which has three tabs


(1) Control Sheet - these percentages are correct
(2) Raw Data
(3) My table

(1) Should = (3)

But the formula in (3) is pulling back incorrect numbers.

Can someone have a look at my formula and named ranges and see where i am going wrong.

Many thanks
Seamus
Test-Formula.xlsx
0
Seamus2626
Asked:
Seamus2626
  • 4
  • 4
  • 4
2 Solutions
 
NBVCCommented:
I am not sure what you meant by "(1) Should = (3) " & "But the formula in (3) is pulling back incorrect numbers"?

what exactly is (3)?
0
 
Seamus2626Author Commented:
3 is tab "S7 - Product Risk Scenario"

That should have the same results as my control sheet

Many thanks
0
 
Seamus2626Author Commented:
To make it clearer, i moved my table from tab "S7 - Product Risk Scenario" to tab "control sheet" and you can see that the numbers are good, but the formula in my table in "S7 - Product Risk Scenario" should be doing the same thing and returning the same numbers

Thanks
Test-Formula.xlsx
0
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 
barry houdiniCommented:
I think there are several things that are different, Seamus

One of the formulas uses Percentile.EXC and the other Percentile.INC......and CashFormula is defined over 12 columns, should it be one?

Also on the control sheet you are using the whole of column B whereas the other formula only references 101 rows. If you change the definition of CashFormula to be a single column, i.e.

=OFFSET('Input - D1'!$W$8,0,0,COUNT('Input - D1'!$W:$W))

and then change the Control sheet formula to this in C1 copied down

=PERCENTILE.EXC(B$1:B$101,D1)

then the two should get the same results, see attached

regards, barry

PS the formula in S7 sheet doesn't need MATCH if you are only matching with one value, this would get you the same results in this case

=PERCENTILE.EXC(IF(InputRange=2,CashFormula),'S7 - Product Risk Scenario'!D28)
Test-Formula-barry.xlsx
0
 
Seamus2626Author Commented:
Hi Barry,

It must be over 12 columns as when the data is fully populated there will be 12 months of data.

But why would that make a difference, if theres no data, it should not affect the calculation?

Thanks
0
 
NBVCCommented:
It seems that your formula converts the blanks in CashFormula to 0's so it takes those into account.  So we need to correct for that.

Also, your column B:B in Control Sheet doesn't correspond to the data in S7 sheet....

And you use Percentile.Inc in one sheet and Percentile.EXC in the other...

try:

=PERCENTILE.EXC(IF(ISNUMBER(MATCH(InputRange,{2},0)),IF(CashFormula="","",CashFormula)),D28)
0
 
barry houdiniCommented:
....but the other columns are not blank, you have values in columns X and Y. Even if you delete the values in X and Y the array formula treats blanks as zeroes and so that distorts the Percentile Calculation - if you want to ignore blanks in the CashFormula range you need to amend the formula like this

=PERCENTILE.EXC(IF(InputRange=2,IF(CashFormula<>"",CashFormula)),'S7 - Product Risk Scenario'!D28)

That will work across a 12 column range, ignoring any blanks

regards, barry
0
 
NBVCCommented:
..which is what I said too... :)
0
 
barry houdiniCommented:
Sorry NB_VC, I didn't see your last reply when I posted....but I could say the same - I already pointed out the INC and EXC discrepancy in my earlier answer and that the 2 ranges were not equal!

regards, barry
0
 
NBVCCommented:
Sorry Barry, please don't take it the wrong way.... I was just confirming that we both said the same thing to re-enforce that the reason for the problem....
0
 
barry houdiniCommented:
Hey! No problem,

....and I've been sitting here all this time wondering what this calculation does

'S7 - Product Risk Scenario'!D28

The value in S7 minus another value......Doh! it's all the sheet name.........

regards, barry
0
 
Seamus2626Author Commented:
Lads youve both been a huge help, got all my underlying data sorted and it all works out

Thank you very much for your help and patience!

Seamus
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 4
  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now