Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Nested IIF formula for checking values

Posted on 2014-03-11
9
Medium Priority
?
117 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 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

670 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