+ Reply to Thread
Results 1 to 5 of 5

Default count how many times a value is changed in a table ignoring duplicates

  1. #1
    Registered User
    Join Date
    02-25-2017
    Location
    Los Angeles
    MS-Off Ver
    2016
    Posts
    2

    Default count how many times a value is changed in a table ignoring duplicates

    Hello Everyone, sorry if this was answered already but I could not locate it.
    Assuming that a,b,c,d are people, 1-9 are dates, "1" is when I have them present, "h" when they are a home. I need to know how many times each one in a given period has been at home.
    I need the formula to count how many times in a table(row) a value is changing from "1" to "h". If "h" is in the next cell it should be considered as one time.


    0 1 2 3 4 5 6 7 8 Should look like
    a h 1 1 1 h h h 1 2
    b h 1 h 1 1 h h 1 3
    c 1 1 1 1 h 1 1 1 1
    d h 1 1 1 1 h h 1 2

    Thanks in advance
    Last edited by galgo; 02-25-2017 at 08:14 PM. Reason: Correction

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,025

    Re: Default count how many times a value is changed in a table ignoring duplicates

    use this:

    =SUMPRODUCT((B2:H2="h")*(C2:I2=1))

    Note that the ranges OVERLAP, they are NOT the same.

    Also the formula is set to look for h then 1, as shown in your data, and not 1 followed by h, as indicated in your description!!
    Attached Files Attached Files
    Last edited by Glenn Kennedy; 02-25-2017 at 10:20 PM.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Default count how many times a value is changed in a table ignoring duplicates

    Administrative Note:
    HTH
    Regards, Jeff

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,025

    Re: Default count how many times a value is changed in a table ignoring duplicates

    I've just seen the cross post. Thanks for wasting my time, Galgo... You already have your answer, it seems.

  5. #5
    Registered User
    Join Date
    02-25-2017
    Location
    Los Angeles
    MS-Off Ver
    2016
    Posts
    2
    Quote Originally Posted by Glenn Kennedy View Post
    I've just seen the cross post. Thanks for wasting my time, Galgo... You already have your answer, it seems.
    Guys sorry for cross post I didn't realize that. Thanks everyone

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Can Pivot Table default settings be Changed?
    By cqhollon in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 10-23-2015, 02:41 PM
  2. Count occurrence per row ignoring duplicates in column
    By braun.reivn in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-24-2015, 09:53 PM
  3. [SOLVED] Array Formula to count specific text ignoring duplicates.
    By JRidge in forum Excel Formulas & Functions
    Replies: 30
    Last Post: 10-07-2013, 05:31 AM
  4. [SOLVED] formula that can count number of orders booked on a Date ignoring duplicates
    By Frankmed in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-20-2013, 05:26 PM
  5. Replies: 0
    Last Post: 04-05-2010, 03:38 PM
  6. [SOLVED] I need to keep a count of the times a cell is changed
    By Paul Cahoon in forum Excel General
    Replies: 2
    Last Post: 12-29-2005, 11:15 AM
  7. [SOLVED] Count How Many Times A Cell's Value Has Been Changed
    By Avais in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-24-2005, 12:06 AM

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