Solved

Nested IIF formula for checking values

Posted on 2014-03-11
9
110 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
  • 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 21

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
 
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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

707 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

17 Experts available now in Live!

Get 1:1 Help Now