Solved

issue with excel formula

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

Independent Software Vendors: 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!

Question has a verified solution.

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

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…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

726 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