Solved

Formula not working on testing

Posted on 2013-11-14
12
191 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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

696 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