+ Reply to Thread
Results 1 to 14 of 14

Filling the row based on criteria

  1. #1
    Registered User
    Join Date
    11-07-2009
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    81

    Filling the row based on criteria

    In Column " E " I have login times of employees & based on this login time I wanted the complete row to be filled as shown in the spreadsheet .

    Overview - Basically I wanted to see the occupancy of the seats available , each employee is scheduled for 9 hrs . Once I have this sheet filled completely , I' can then see how many seats can be shared . I'll have atleast 1000 + seats and I need something to sort this easily . Any help would be much appreciated . Thanks a lot .
    Attached Files Attached Files
    Last edited by vamshi57; 04-11-2010 at 06:10 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Filling the row based on criteria

    Put this formula in Z3 and then copy down/across the table:

    =--(AND($E3<>"",$E3<=Z$1,$F3>=Z$1))
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    11-07-2009
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    81

    Re: Filling the row based on criteria

    Awesome . This was very short & good one . Thank you so much .

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Filling the row based on criteria

    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

  5. #5
    Registered User
    Join Date
    11-07-2009
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    81

    Re: Filling the row based on criteria

    I just realized that its not working when I use any time after 12:00 PM , for ex I just entered "16:30 " in cell E . Its not filling the sheet for complete 9 hrs , Can you please modify the formula . Thank you

  6. #6
    Registered User
    Join Date
    11-07-2009
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    81

    Re: Filling the row based on criteria

    any help on this ? Thank you

  7. #7
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Filling the row based on criteria

    In F3, copied down:

    =IF(ISBLANK(E3), "", E3+(9/24)-(E3>=0.625))

    In Z3 copied down and across the table:

    =IF(ISBLANK($E3),0,IF($F3<$E3,--OR($F3>Z$1,$E3<=Z$1),--(AND($E3<=Z$1,$F3>=Z$1))))

  8. #8
    Registered User
    Join Date
    11-07-2009
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    81

    Re: Filling the row based on criteria

    I tried this formula but its its missing on logout times . For ex - In the attached spreadsheet "AC3 " should be filled as per the criteria but its not , same with "AE5" . Thank you so much for the quick response .
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    11-07-2009
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    81

    Re: Filling the row based on criteria

    Any help on this ? thank you

  10. #10
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Filling the row based on criteria

    Why should AC3 be 1? The seat is available at 1:30. Ditto for AE5.
    Entia non sunt multiplicanda sine necessitate

  11. #11
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Filling the row based on criteria

    Exactly. Each slot on your chart represents a 30-minute slot starting at the time listed in the column header. It represents the entire 30-minutes. So a shift that ends at 1:30 would have a "1" in the 1:00 slot which takes it up to 1:30, but not in the 1:30 slot because that represents the 30 minutes leading up to 2:00. So I think you're misreading your own chart.

    To verify this...count the 1s on a row. A 9-hour shift should have 18 1s...and they do.

  12. #12
    Registered User
    Join Date
    11-07-2009
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    81

    Re: Filling the row based on criteria

    You are right , but if I try 03:30 shift , its giving me 19 1's , while others giving me 18 1's . Thank you

  13. #13
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Filling the row based on criteria

    The only way I can get your chart to read completely correctly is to:

    1) Delete column BV, it is a duplicate of column Z
    2) Change the formula one more time to use some ROUNDing to eliminate the precision decimal variances.

    =IF(ISBLANK($E3),0,IF($F3<$E3,--OR(ROUND($F3,5)>ROUND(Z$1,5),$E3<=Z$1),--(AND($E3<=Z$1,$F3>Z$1))))
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    11-07-2009
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    81

    Re: Filling the row based on criteria

    Thank you so much . It worked fine now .

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