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

x
?
Solved

formula to work out if if cell m2 < 3 days 4 hours  and g2 = "SLA 1" then "SLA 1 met"

Posted on 2013-01-08
8
Medium Priority
?
479 Views
Last Modified: 2013-01-08
hi long day and need help with this in excel: ps i not a great excel user: BAsic i would say

I need the formula to work out if
if cell m2 < 3 days 4 hours  and g2 = "SLA 1" then "SLA 1 met"

example data
G2            m2
SLA 1      7 Days 3 Hours
SLA 1      3 Days 3 Hours
SLA 2      72 Days 23 Hours
SLA 1      4 Days 0 Hours
SLA 1      1 Days 0 Hours
0
Comment
Question by:James Murrell
[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
  • 3
8 Comments
 
LVL 26

Expert Comment

by:redmondb
ID: 38756941
Hi, cs97jjm3.

Please see below for a single cell solution. However, it would be easier to maintain of it was split into multiple cells. Let me know if you want to do this.
=IF(G2<>"SLA 1","",IF(76>TRIM(MID(M2,1,FIND("Days",M2,1)-1))*24+TRIM(MID(M2,FIND("Days",M2,1)+4,FIND("Hours",M2,1)-FIND("Days",M2,1)-4))*1,"SLA 1 Met","SLA 1 Not Met"))

Regards,
Brian.
0
 
LVL 31

Author Comment

by:James Murrell
ID: 38756976
Thanks I like the idea of splitting it? how?

also should i add another column if SLA 2 ,SLA3
0
 
LVL 26

Expert Comment

by:redmondb
ID: 38757019
cs97jjm3,

also should i add another column if SLA 2 ,SLA3
I thought that might be coming!

Which version of Excel are you using?

Thanks,
Brian.
0
Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

 
LVL 31

Author Comment

by:James Murrell
ID: 38757022
2010   with all updates
0
 
LVL 26

Accepted Solution

by:
redmondb earned 1400 total points
ID: 38757068
Thanks, cs97jjm3.

Please see attached. If you have lots of SLA's then they should probably be in a normal table rather than array constants.

Regards,
Brian.SLA-s.xlsx
0
 
LVL 93

Assisted Solution

by:Patrick Matthews
Patrick Matthews earned 600 total points
ID: 38757075
Assuming you have a stable format of "# days # hours", then select that column, and use Data / Data Tools / Text to Columns in the Ribbon to split.

If you do that, so that now M has the number of days and O has the number of hours, it becomes much, much easier:

=IF(M2+O2/24<3+4/24,"SLA 1 Met","SLA 1 not met")
0
 
LVL 31

Author Closing Comment

by:James Murrell
ID: 38757114
Thanks, what would we do without EE
0
 
LVL 26

Expert Comment

by:redmondb
ID: 38757194
Thanks, cs97jjm3!
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Outlook for dependable use in a very small business   This article is about using the Outlook application (part of Microsoft Office) in a very small business, or for homeowners where dependability and reliability are critical requirements. This …
Ever wonder what it's like to get hit by ransomware? "Tom" gives you all the dirty details first-hand – and conveys the hard lessons his company learned in the aftermath.
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 in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

688 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