Solved

issue with excel formula

Posted on 2011-10-01
5
181 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
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…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
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…

825 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