Solved

Nested IIF formula for checking values

Posted on 2014-03-11
9
113 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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

820 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