Solved

issue with excel formula

Posted on 2011-10-01
5
179 Views
Last Modified: 2012-08-14
Hello all

I have an issue with a formula in one cell:
=+SI(ESTVIDE(D9),"-",SI(D9="-","-",SI(D9>=2%,"B",SI(D9>=0,"G",SI(D9>=-1%,"A",SI(D9>=-2%,"R"))))))

Open in new window


This formula is in cell column E.

So if for example, in cell B of the same row, i have the value: 1546

And in column C: 1472
then, in column D, i have a formula : =(C12-B12)/B12
That will give the result: -5%

So with the big formula where i have an issue, i should get the result "G"
But i have FALSE.

But if i change the formula =(C12-B12)/B12 with the real result -5%, then, it give me the result G.

Can you help me with that?

Thanks

test.xlsx
0
Comment
Question by:Wilder1626
5 Comments
 
LVL 37

Expert Comment

by:Neil Russell
ID: 36896482
Because cell D12 contains a formula that gives a numeric answer. All you have done is changed the display format so it SHOWS -5%

Your compares need to be again actual values.

=IF(ISBLANK(D12),"-",IF(D12="-","-",IF(D12>=0,"B",IF(D12>=0,"G",IF(D12>=-0.01,"A",IF(D12>=-0.02,"R","Out of Range"))))))
0
 
LVL 19

Accepted Solution

by:
regmigrant earned 250 total points
ID: 36896531
The final part of your formula

SI(D9>=-2%,"R") does not have a 'False' condition so excel is returning 'False' which is correct because D9 is NOT greater than or equal to -2%.( -5% is LESS than -3%.)
your formula will return 'false' for any number less than -2%

to get a G returned from this formula you would have to have a number slightly more than 0 and slightly less than 2

Without knowing what you are trying to achieve its difficult to advise further but the following might help you understand where your problem lies

=IF(OR(ISBLANK(D12),D12="-"),"-",IF(D12>=2%,"B",IF(D12>=0,"G",IF(D12>=-1%,"A",IF(D12>=-2%,"R","other")))))





0
 
LVL 50

Assisted Solution

by:barry houdini
barry houdini earned 250 total points
ID: 36896592
Neilsr,

It isn't a problem to compare against percentages - the test =D12>=-2% is as valid as =D12>=-0.02

I agree with regmigrant, -5% doesn't fall into any of the categories specified, hence FALSE. I think that happens whether -5% is returned by the formula or manually inserted.

Perhaps you can specify in words what you want the formula to do, Wilder1626

regards, barry
0
 
LVL 11

Author Closing Comment

by:Wilder1626
ID: 36896627
Thanks to both of you, since R is my last result i can get, i have changed it to SI(D12>=-100%,"R") instead of SI(D12>=-2%,"R").

Thanks again
0
 
LVL 19

Expert Comment

by:regmigrant
ID: 36906377
just a style point on your final comment - if D12 is ever lower than -100% you will get False again. If you are sure this can't happen its ok but from an elegance point of view you dont need the final 'Si', if you always want to return "R" at this point you can just put "R" because there is no other result
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

863 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

23 Experts available now in Live!

Get 1:1 Help Now