+ Reply to Thread
Results 1 to 14 of 14

Counting empty cells to the left

  1. #1
    Forum Contributor
    Join Date
    09-22-2009
    Location
    Henderson, KY
    MS-Off Ver
    Excel 2007
    Posts
    152

    Counting empty cells to the left

    I am trying to count the # of empty cells to the left
    I trying to work out how many days since an employee has missed
    In this worksheet, a letter is placed in the cell corresponding to the day they missed. And I need to count backwards from a date (say: July 31st) to the last day with a letter in it.
    Last edited by Befuddled; 10-06-2009 at 04:49 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Counting empty cells to the left

    A sample file is generally helpful in these situations...

    =COLUMN(Z1)-MATCH(REPT("Z",255),A1:Z1)

    would for ex. return the count of blanks between Z1 and the last text entry in A1:Z1

  3. #3
    Forum Contributor
    Join Date
    09-22-2009
    Location
    Henderson, KY
    MS-Off Ver
    Excel 2007
    Posts
    152

    Re: Counting empty cells to the left

    Here is the file, I have made it pop up an "X" if that person has been absent in the last 6 months, but now someone needs to know how long since the last absence.
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    09-22-2009
    Location
    Henderson, KY
    MS-Off Ver
    Excel 2007
    Posts
    152

    Re: Counting empty cells to the left

    Also, could you expain what the 255 was for in your formula

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Counting empty cells to the left

    Could you post a version with your desired output (calculated manually of course) ... based on your last file I'm not sure where you want these results to appear nor from which date the calculation is meant to be based... presumably today ?

  6. #6
    Forum Contributor
    Join Date
    09-22-2009
    Location
    Henderson, KY
    MS-Off Ver
    Excel 2007
    Posts
    152

    Re: Counting empty cells to the left

    The area highlighted in yellow is what I would like to be able to calculate, I did the ones for Team Member "A" manually
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    09-22-2009
    Location
    Henderson, KY
    MS-Off Ver
    Excel 2007
    Posts
    152

    Re: Counting empty cells to the left

    calculation would be from the end of each month

  8. #8
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Counting empty cells to the left

    Given the nature of your set-up and so as to reduce repetitive calcs I would be inclined to do something like:

    Please Login or Register  to view this content.
    Then to generate results

    Please Login or Register  to view this content.
    Re: use of REPT("Z",255) see Bob Phillips' article on finding "last values": http://www.xldynamic.com/source/xld.LastValue.html

  9. #9
    Forum Contributor
    Join Date
    09-22-2009
    Location
    Henderson, KY
    MS-Off Ver
    Excel 2007
    Posts
    152

    Re: Counting empty cells to the left

    That formula gives me a #N/A error

  10. #10
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Counting empty cells to the left

    Attachment represents that uploaded in post # 6 with addition of formulae as suggested in post # 8
    Attached Files Attached Files

  11. #11
    Forum Contributor
    Join Date
    09-22-2009
    Location
    Henderson, KY
    MS-Off Ver
    Excel 2007
    Posts
    152

    Re: Counting empty cells to the left

    When I tried to do the formulas in post 8. the formulas on row 56 were coming up with results of 1,2,3,4,5,6,7,8,9,10,11,12. Then when I copied the formula from the 1st cell (in row 56) on your last post, it came up with different #'s than in your spreadsheet. Sorry if I'm not following along too fast, I've only been messing with Excel for a short time and no one at my work has any knowledge for me to gleen from.

  12. #12
    Forum Contributor
    Join Date
    09-22-2009
    Location
    Henderson, KY
    MS-Off Ver
    Excel 2007
    Posts
    152

    Re: Counting empty cells to the left

    when I copied your formulas into the cells in row 56.. I came up with 1,3,6,10,15,21,28,36,45,55,66,78.

  13. #13
    Forum Contributor
    Join Date
    09-22-2009
    Location
    Henderson, KY
    MS-Off Ver
    Excel 2007
    Posts
    152

    Re: Counting empty cells to the left

    Thanks for the help. I think I understand most of it.

  14. #14
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Counting empty cells to the left

    The formulae in row 56 calculated YTD days at end of month based on month specified in row 29
    (these formulae are necessitated by fact that Feb will vary every four years and as such so will layout of your data above).

    The formula in rows 30 to 53 then use the cumulative days value in row 56 to determine the last column (B onwards) that should be included in the calculations to determine days since last absence... basic premise is also that you have done your "prior 6 month" absence count for all months - it uses that to establish as to whether or not it need locate an absence at all... ie if no absences then you know days since last absence = ytd days.

    If you're failing to get the correct results I would ask that you post that specific file such that we can investigate further.

+ 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