+ Reply to Thread
Results 1 to 7 of 7

time & attendance 4

  1. #1
    Registered User
    Join Date
    08-08-2012
    Location
    bucharest
    MS-Off Ver
    Excel 2003
    Posts
    14

    time & attendance 4

    Hi...
    The issues are the same as in time&attendance 3 - but with some added content.

    THE ERROR APPEARS WHEN I HAVE NO ATTENDANCE DATA OR WHEN I HAVE ONLY ENTRANCE AND NO EXIT OR ONLY EXIT AND NO ENTRY OR BOTH.
    I NEED THE FORMULA TO IGNORE THE ROWS WHERE I HAVE NO ENTRY OR NO EXIT OR BOTH.

    This was the issue in attendance 3:
    "I NEED THE FORMULA TO IGNORE THE ROWS WHERE I HAVE NO ENTRY OR NO EXIT OR BOTH.
    Here I come again - same problem - different data from another control acces system.
    I need to extract from the sheet 1 data table - the daily worked time (difference between clock in and out columns) marked in green cells for one month to the sheet 2 table.
    I need to match the name and the date and the value from green cell ofcourse!

    Thanks to Bob Phillips who suggested this formula:

    =SUMPRODUCT(--(Sheet1!$D$2:$D$13=$C10),--(DAY(Sheet1!$E$2:$E$13)=V$9),--(Sheet1!$J$2:$J$13-Sheet1!$I$2:$I$13))

    It works great but gives error when i have no exit or no entry or both no exit and no entry (in my original data this kind of error was no present so the formula was designed to work with that particular table data).
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    04-19-2010
    Location
    Ohio, USA
    MS-Off Ver
    Excel 2007
    Posts
    93

    Re: time & attendance 4

    My very first thought, and I hate to be that guy, is you should look at a database solution for this. I've seen far too many payroll, inventory and attendance workbooks that get so complicated after a few years of use, you need an excel PhD to work on them.

    You can probably insert =ISBLANK() wrapped in an =IF() that will output something that shuts the formula off like a - number. Then you wrap the whole thing in another if to return a blank or a 0 if the number is negative, but it looks convoluted enough as it sits!
    Excel\Access, VBA, C#, C++, SQL, Java

  3. #3
    Registered User
    Join Date
    08-19-2011
    Location
    Norwich, England
    MS-Off Ver
    Excel 2007
    Posts
    56

    Re: time & attendance 4

    I'd agree - with Bmoe's suggestion. If we're doing this in the cells, i.e. not using VBA, then testing the cells with an =ISBLANK() seems sensible.

    As there's two cells, try:

    =IF(OR(ISBLANK(A2), ISBLANK(B2)), "", long forumla here)

    So, if either cell is blank, it does nothing, else it calculates the formula from Bob Phillips.

    Is that a workable solution for you, sscssc?

    HTH.

    S.

  4. #4
    Registered User
    Join Date
    08-08-2012
    Location
    bucharest
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: time & attendance 4

    That is great but it does not work...still #value! returns...perhaps because i know so little about excel...
    this is the formula i used based on your advice:
    =IF(OR(ISBLANK(Sheet1!I2), ISBLANK(Sheet1!J2)), "", SUMPRODUCT(--(Sheet1!$D$2:$D$139=$C10),--(DAY(Sheet1!$E$2:$E$139)=G$9),--(Sheet1!$J$2:$J$139-Sheet1!$I$2:$I$139)))
    where do i go wrong?

  5. #5
    Registered User
    Join Date
    08-08-2012
    Location
    bucharest
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: time & attendance 4

    strange...it seems that although there is nothing written in the cell, the cell is not blank ...only when i press delete on that cell i get the true result to isblank formula on the i and j columns!

  6. #6
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: time & attendance 4

    Pl see the attached file with formula in 45-50 rows.
    Tested for blank cells in I & J columns of Sheet1.
    (In original file we have to delete the contents in blank cell also?).
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    08-08-2012
    Location
    bucharest
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: time & attendance 4

    tHANK YOU! your formula is exactly what i needed!

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