Solved

Formula not working on testing

Posted on 2013-11-14
12
160 Views
Last Modified: 2013-11-14
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
Comment
Question by:Seamus2626
  • 4
  • 4
  • 4
12 Comments
 
LVL 23

Assisted Solution

by:NBVC
NBVC earned 250 total points
ID: 39647729
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
 

Author Comment

by:Seamus2626
ID: 39647775
3 is tab "S7 - Product Risk Scenario"

That should have the same results as my control sheet

Many thanks
0
 

Author Comment

by:Seamus2626
ID: 39647792
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
 
LVL 50

Accepted Solution

by:
barry houdini earned 250 total points
ID: 39647799
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
 

Author Comment

by:Seamus2626
ID: 39647823
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
 
LVL 23

Expert Comment

by:NBVC
ID: 39647850
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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 50

Expert Comment

by:barry houdini
ID: 39647858
....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
 
LVL 23

Expert Comment

by:NBVC
ID: 39647871
..which is what I said too... :)
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 39647880
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
 
LVL 23

Expert Comment

by:NBVC
ID: 39647939
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
 
LVL 50

Expert Comment

by:barry houdini
ID: 39647977
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
 

Author Closing Comment

by:Seamus2626
ID: 39647988
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Drop Down List with Unique/Distinct Values (enhancing the Combo-Box with a few steps and a little code) David miller (dlmille) Intro Have you ever created a data validation list from a database field or spreadsheet column (e.g., Zip Codes or Co…
Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now