Solved

Nested IIF formula for checking values

Posted on 2014-03-11
9
114 Views
Last Modified: 2014-03-13
I need a formula to do the following.  The formula would show in column J like in the attached.  Thanks in advance.

If it goes from .000000274 to above .000000274 then it should say Check
If it goes from .000000274 to below .000000274 then it should say Check
If it is above .000000274 and the next day is also above .000000274 then it would say Valid
If it stays at .000000274 for both current and prior day mil rates then it would say Valid
0
Comment
Question by:leezac
[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
9 Comments
 
LVL 26

Expert Comment

by:pony10us
ID: 39921748
missing attachment?
0
 

Author Comment

by:leezac
ID: 39921778
I just realized
formula.zip
0
 
LVL 22

Expert Comment

by:Ejgil Hedegaard
ID: 39921827
You have 2 conditions for Valid.
Both equal to .000000274, or both above.
If not then Check, so formula is

=IF(OR(AND(G2=0.000000274,H2=0.000000274),AND(G2>0.000000274,H2>0.000000274)),"Valid","Check")

Open in new window

0
Technology Partners: 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!

 
LVL 26

Expert Comment

by:pony10us
ID: 39921857
Another way:

=IF(AND(G2=0.000000274,(OR(H2>0.000000274,H2<0.000000274))),"check",IF(OR(AND(G2>0.000000274,H2>0.000000275),(AND(G2=0.000000274,H2=0.000000274))),"valid",""))

Open in new window


This one allows for every condition that you mentioned however after reviewing the difference between the two solutions offered the one by hgholt accounts for the missing one where "Prior" is above 0.000000274 and "Current" is below "Prior.

If the last scenario occurs then my formula would simply provide a blank (empty) response where hgholt's provides "check"
0
 

Author Comment

by:leezac
ID: 39921935
The last one is what I am going to use and I believe it is going to work fine.  Let me test and I will award points.  Thanks for fast response.
0
 

Author Comment

by:leezac
ID: 39924347
Ok using the last formula
the “check” in column G is still not working properly and is giving a “check” when comparing 0.000000274 to 0.000000274 - it should be "Valid"
0
 
LVL 26

Expert Comment

by:pony10us
ID: 39924371
Interesting.  It seems to work when I do it.
formula.xlsx
0
 

Author Comment

by:leezac
ID: 39924395
I know - do you think we need to take out the G2=0.000000274 - would that confuse it.

=IF(AND(G2=0.000000274,(OR(H2>0.000000274,H2<0.000000274))),"check",IF(OR(AND(G2>0.00
0
 
LVL 26

Accepted Solution

by:
pony10us earned 500 total points
ID: 39924487
=if(and(g2=0.000000274,(or(h2>0.000000274,h2<0.000000274))),"check"

checks to see if g2 is 0.000000274
AND
h2 is higher or lower than (not equal to) 0.000000274

If the above two checks are true then "check"

If the above two checks are false then:

if(or(and(g2>0.000000274,h2>0.000000275),(and(g2=0.000000274,h2=0.000000274))),"valid",""))

If either g2 AND h2 equal 0.000000274 OR g2 is greater than 0.000000274 and h2 is greater than 0.000000275 then this should return "valid" (true) otherwise it should return nothing (false)

The very last check "and(g2=0.000000274,h2=0.000000274" should be the one that gives you "valid" if both are equal to 0.000000274,
0

Featured Post

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

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…
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
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…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

710 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