+ Reply to Thread
Results 1 to 8 of 8

Thread: in between #...issue if statement

  1. #1
    Valued Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Prefer Excel 2003 but 2007 is great!
    Posts
    611

    in between #...issue if statement

    Hello

    Having some trouble trying to get the if statement to work or not sure what direction to take....

    basically, i have two criterias

    1) # of days to complete - column J

    2) service response time - column N

    basically, days to complete is how long it took our company to complete the service in (actual), and service response time is agreement to do so (budgeted)...

    the issue is, the service resposne time is in words like (3-5 days etc), so im not sure how to break that up as there are over thousands of lines.

    i have attached a sample and highlighted in red, the issues (column O & R)

    column O = simple "Yes" or "No" - if days to complete is within service time frame, then YES, else NO

    column R = calculation - if days to compelete is outside of service response time (3-5 days) then max of 3-5 days minus days to compelte

    i.e.
    days to complete 3-5 days, service time 8 days
    therefore = 8-5
    =3 days

    can someone pls help with this, been struggling hard, thank you.

    cheers
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    06-28-2011
    Location
    austin
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: in between #...issue if statement

    You seem to have a data issue here. There is no standard to the data in column N so it is really not possible to separate the data either logically or through programming. Can I suggest changing the way you store the information that you store in the notes field of all stores into a minimum and a maximum number of days. It will create a much better data format for future improvements as well. Also if you need help in how to break that data up in a formula let me know.

  3. #3
    Valued Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Prefer Excel 2003 but 2007 is great!
    Posts
    611

    Re: in between #...issue if statement

    hello there

    thxs for your input

    i was hoping, if we can ignore things such as "E2W on Tuesdays" etc and focus where it only says "3-5 days"....i was hoping that portion can at laest be broken out into to do the yes/no scenario and # of days over?

    i appreciate your help, pls let me know, thxs!

  4. #4
    Valued Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Prefer Excel 2003 but 2007 is great!
    Posts
    611

    Re: in between #...issue if statement

    Quote Originally Posted by everythingneon View Post
    You seem to have a data issue here. There is no standard to the data in column N so it is really not possible to separate the data either logically or through programming. Can I suggest changing the way you store the information that you store in the notes field of all stores into a minimum and a maximum number of days. It will create a much better data format for future improvements as well. Also if you need help in how to break that data up in a formula let me know.
    hey there

    just wondering if you can give me an example of what you mean by "max and min # of days?"

    thxs buddy

  5. #5
    Valued Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Prefer Excel 2003 but 2007 is great!
    Posts
    611

    Re: in between #...issue if statement

    any solutions guys? thx you.

  6. #6
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,636

    Re: in between #...issue if statement

    Is it always 3-5 days? Or could it be 2-10 days, etc also? And do you definitely want to ignore the E2W etc items?
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  7. #7
    Valued Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Prefer Excel 2003 but 2007 is great!
    Posts
    611

    Re: in between #...issue if statement

    Hello NBVC

    Currently the list only shows 3-5 days so it would be great if a formula can be worked out.

    also, is it possible to show a "YES" when items also contain "E" in the start and "P" and blanks?

    thx you for your help with this matter.

  8. #8
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,636

    Re: in between #...issue if statement

    Possibly then:

    =IF(OR(LEFT(N7)={"E","P"},N7=""),"Yes",IF(J7<=MID(SUBSTITUTE(N7,"days",""),FIND("-",SUBSTITUTE(N7,"days",""))+1,100)+0,"Yes","No"))
    and in P7:

    =IF(O7="No",J7-MID(SUBSTITUTE(N7,"days",""),FIND("-",SUBSTITUTE(N7,"days",""))+1,100),"")
    and in Q7:

    =IF(P7="","",IF(P7>0,(VLOOKUP(P7,Controls!$B$5:$C$9,2,TRUE))*L7,""))
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0