+ Reply to Thread
Results 1 to 16 of 16

If then statement problems

  1. #1
    Registered User
    Join Date
    10-20-2014
    Location
    St. Louis, MO
    MS-Off Ver
    2013
    Posts
    12

    If then statement problems

    I am looking for a formula in a scheduling template I have created. Currently I have a formula that fills time cells between two times a color, but I need a formula that changes the lunch and breaks to a differently value. My currently formula is =IF(AND(N1>=B3,N1=<C3,"yes","") I want to add if a formula to this that says "no" during the break and lunch times.

  2. #2
    Forum Expert boopathiraja's Avatar
    Join Date
    07-12-2013
    Location
    Coimbatore,TamilNadu, India
    MS-Off Ver
    Excel 2007, 2013, 2016, 365
    Posts
    1,455

    Re: If then statement problems

    Hi, Welcome to the forum,

    You mean this

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Click just below left if it helps, Boo?ath?

  3. #3
    Registered User
    Join Date
    10-20-2014
    Location
    St. Louis, MO
    MS-Off Ver
    2013
    Posts
    12

    Re: If then statement problems

    Hmm…nothing shows up

  4. #4
    Forum Expert boopathiraja's Avatar
    Join Date
    07-12-2013
    Location
    Coimbatore,TamilNadu, India
    MS-Off Ver
    Excel 2007, 2013, 2016, 365
    Posts
    1,455

    Re: If then statement problems

    can you post your req in excel with expected outputs

  5. #5
    Registered User
    Join Date
    10-20-2014
    Location
    St. Louis, MO
    MS-Off Ver
    2013
    Posts
    12

    Re: If then statement problems

    Here's the problem in a workbook...example 1.xlsx

  6. #6
    Forum Expert boopathiraja's Avatar
    Join Date
    07-12-2013
    Location
    Coimbatore,TamilNadu, India
    MS-Off Ver
    Excel 2007, 2013, 2016, 365
    Posts
    1,455

    Re: If then statement problems

    in J2 and drag it across

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  7. #7
    Forum Expert boopathiraja's Avatar
    Join Date
    07-12-2013
    Location
    Coimbatore,TamilNadu, India
    MS-Off Ver
    Excel 2007, 2013, 2016, 365
    Posts
    1,455

    Re: If then statement problems

    Hi, Ref the attachment
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    10-20-2014
    Location
    St. Louis, MO
    MS-Off Ver
    2013
    Posts
    12

    Re: If then statement problems

    The only problem is now when I change the End Lunch cell it doesn't show in the time line correctly.
    efb.xlsx

  9. #9
    Forum Expert boopathiraja's Avatar
    Join Date
    07-12-2013
    Location
    Coimbatore,TamilNadu, India
    MS-Off Ver
    Excel 2007, 2013, 2016, 365
    Posts
    1,455

    Re: If then statement problems

    fg3- showing - 12:15 PM
    u1- showing -12:30 PM - which means the lunch will be from 12 to 12.15 pm (15 min) so the result will be "yes"

    so the result will be yes, if you change the cell U1 to 12:15 pm the result will show- no

  10. #10
    Registered User
    Join Date
    10-20-2014
    Location
    St. Louis, MO
    MS-Off Ver
    2013
    Posts
    12

    Re: If then statement problems

    I see where I went wrong, but why doesn't it work this way? One of the "No" is missing?efb-2.xlsx

  11. #11
    Forum Expert boopathiraja's Avatar
    Join Date
    07-12-2013
    Location
    Coimbatore,TamilNadu, India
    MS-Off Ver
    Excel 2007, 2013, 2016, 365
    Posts
    1,455

    Re: If then statement problems

    Ok try the below in J2 (will put everything into round to avoid decimal prob's in time value)

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    10-20-2014
    Location
    St. Louis, MO
    MS-Off Ver
    2013
    Posts
    12

    Re: If then statement problems

    I did that and checked sometimes it still applies yes, even when it should be a no.

  13. #13
    Forum Expert boopathiraja's Avatar
    Join Date
    07-12-2013
    Location
    Coimbatore,TamilNadu, India
    MS-Off Ver
    Excel 2007, 2013, 2016, 365
    Posts
    1,455

    Re: If then statement problems

    HI, Refer the attachment, check which cell giving the wrong results
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    10-20-2014
    Location
    St. Louis, MO
    MS-Off Ver
    2013
    Posts
    12

    Re: If then statement problems

    Thank you for your help this worked out amazing for me!

  15. #15
    Forum Expert boopathiraja's Avatar
    Join Date
    07-12-2013
    Location
    Coimbatore,TamilNadu, India
    MS-Off Ver
    Excel 2007, 2013, 2016, 365
    Posts
    1,455

    Re: If then statement problems

    If the suggestion helps you, then Click * to Add Reputation and you can mark the thread as Solved

  16. #16
    Registered User
    Join Date
    10-20-2014
    Location
    St. Louis, MO
    MS-Off Ver
    2013
    Posts
    12

    Re: If then statement problems

    When I put this formula in actual spreadsheet for some reason it doesn't work again!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. problems with if statement
    By a2424 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-30-2013, 05:00 AM
  2. [SOLVED] Problems with an IF statement
    By icarrington in forum Excel General
    Replies: 2
    Last Post: 08-23-2012, 07:56 AM
  3. if statement problems
    By nighttrain112 in forum Excel General
    Replies: 2
    Last Post: 01-21-2008, 08:32 AM
  4. Problems with IF statement
    By terry_d in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-05-2006, 01:50 PM
  5. Problems with an IF statement
    By Amaloney in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-15-2005, 12:52 PM

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.6.0 RC 1