+ Reply to Thread
Results 1 to 5 of 5

Identify missing values

Hybrid View

  1. #1
    Registered User
    Join Date
    04-18-2008
    Location
    Chicago, IL
    Posts
    47

    Identify missing values

    Hello again,

    I have a new project I am working on and in it, I am trying to get Excel to identify to me if a certain value hasn't occurred in the previous X attempts (5 in the example sheet attached).

    Another example is...say Johnny hasn't been to school in the last 5 days, it will flag on the 6th day that Johnny wasn't present in the last 5 days.

    I attempted to do this, but could only think of sumproduct function where
    =sumproduct(--($B2:$B6="A"))
    =sumproduct(--($B2:$B6="B"))
    =sumproduct(--($B2:$B6="C"))
    are placed in consecutive columns...and a value of 0 would indicate that the particular value hasn't occurred in the previous 5 cells.

    I suspect that there is a more space conscious method of achieving this...any ideas?

    Thanks!
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    04-21-2007
    Location
    Lima, Peru
    MS-Off Ver
    2000, 2007, 2010
    Posts
    674

    Attendance Check

    HI

    I have attached a simpler way of doing things using an array formula, so you do not need columns B,C and D. The formula can be copied and pasted but if you make any changes you will need to use ctrl-shift-enter to ensure it functions correctly.

    By having the values you are checking kept separately they can be changed without affecting the formula itself.

    Regards

    Jeff
    Attached Files Attached Files

  3. #3
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Without a array

    =SUMPRODUCT(--(B2:B6={"A","B","C"}))
    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  4. #4
    Registered User
    Join Date
    04-18-2008
    Location
    Chicago, IL
    Posts
    47
    Quote Originally Posted by VBA Noob
    Without a array
    Quote:
    =SUMPRODUCT(--(B2:B6={"A","B","C"}))
    This only returns a value of 5 for all the columns, even if A is not present. I wanted it to return "A" the row after "A" hasn't been present for 5 days.
    In situations where A or B isn't present, return A and B in the cell...

    Any ideas?
    Last edited by asdvender; 05-31-2008 at 10:24 AM.

  5. #5
    Registered User
    Join Date
    04-18-2008
    Location
    Chicago, IL
    Posts
    47
    It's been a few days and this topic has gone to the next page.
    Just bumping because I really wanted to see if what I am trying to do is even possible.

+ 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