Solved

Formula not working on testing

Posted on 2013-11-14
12
188 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

697 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