+ Reply to Thread
Results 1 to 5 of 5

Thread: IF function with OR nested - only works on some cells?!

  1. #1
    Registered User
    Join Date
    01-26-2012
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Question IF function with OR nested - only works on some cells?!

    .

    HALP!

    I am creating a staff schedule input sheet (Excel 2010) so that I don't have to manually change each page of my shedule worksheet for every event. I'm by no means an Excel novice, but I'm SURE there is just something small and stupid that I'm missing here.

    Basically, to me, it's looking like my =IF(OR... etc.) functions are chosing to only work in some cells and not others when I copy them down. All refercence cells *seem* to be in the same format, so I don't know why I'm getting different results.

    The workbook is attached - the problem I'm running into is on the "Day 1" tab - the range that contains the formulas I'm having difficulty with is C15:AG39.

    Any insight would be much appreciated.

    Here are two pictures for quick reference (one with formulas showing and one without):

    http://img.photobucket.com/albums/v4...thFormulas.jpg

    http://img.photobucket.com/albums/v4...utFormulas.jpg

    Thanks in advance for taking the time to help me!

    Staff Break Schedule Input Sheet.xlsx
    Last edited by jhoffman1023; 01-26-2012 at 01:11 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    MS Office Excel 2007
    Posts
    841

    Re: IF function with OR nested - only works on some cells?!

    This will only work the way you have it if the times in C9 C10 EQUAL the time in column A
    Since the only times listed in column C's "headers" are 2pm 5pm these are the only ones that are showing up.
    I suspect you want a > < comparison not an =
    Regards
    Special-K

    I rarely return to a problem once I've answered it so make sure you clearly define what the trouble is.

  3. #3
    Valued Forum Contributor
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    MS Office Excel 2007
    Posts
    841

    Re: IF function with OR nested - only works on some cells?!

    Duplicated
    Regards
    Special-K

    I rarely return to a problem once I've answered it so make sure you clearly define what the trouble is.

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

    Re: IF function with OR nested - only works on some cells?!

    It has do with Excel's precision limitations when you are comparing times.. since they are to infinite decimals....

    try rounding each reference to 6 decimals... and because you have some "n/a" values you need to use N() function to convert text to 0...

    eg.

    =IF(OR(ROUND(N($E$9),6)=ROUND(A15,6),ROUND(N($E$10),6)=ROUND(A15,6),ROUND(N($E$11),6)=ROUND(A15,6)), $E$12," ")

    copied down

    or you could use like:

    =IF(COUNT(IF(ROUND(IF($C$9:$C$11<>"n/a",$C$9:$C$11,0),6)=ROUND(A15,6),1)),$C$12,"")

    confirmed with CTRL+SHIFT+ENTER
    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.

  5. #5
    Registered User
    Join Date
    01-26-2012
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: IF function with OR nested - only works on some cells?!

    Life saver!!! That worked! I had a feeling that it had to do with the format/value of the cells but I couldn't quite wrap my mind around how to fix it. Thanks!!!! I will happliy switch this to "solved" now!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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