Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Nested IIF formula for checking values

Posted on 2014-03-11
9
Medium Priority
?
119 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 23

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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
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.

885 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