Solved

issue with excel formula

Posted on 2011-10-01
5
178 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

772 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