+ Reply to Thread
Results 1 to 5 of 5

Difficult Count if or Sum if problem

  1. #1
    Registered User
    Join Date
    03-21-2012
    Location
    England
    MS-Off Ver
    Excel 2016 for Mac
    Posts
    36

    Difficult Count if or Sum if problem

    Hi,
    I have a 'calendar' sheet where a "1" is inserted following certain rules, the cell will have either one or zero. It is a calendar sheet so it will have days of the week (both with dates and name).
    The sheet cannot be changed format as it is needed for some reporting.
    We have to be able to add a column / calculation at the end of the calendar to show "instances" This means if = 1 and previous cell is = 0 then count/sum, if =1 but previous cell is also = 1 then don't count / sum. If cell is = 0 don't count/sum.

    Is there any formula I can use for this?
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,779

    Re: Difficult Count if or Sum if problem

    In P3 copied down:

    =COUNTIFS($B3:$O3,1,$A3:$N3,0)+IF(B3=1,1,0)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    03-21-2012
    Location
    England
    MS-Off Ver
    Excel 2016 for Mac
    Posts
    36

    Re: Difficult Count if or Sum if problem

    Thank you so much, i'll give it a go with the real data but it seems to work well

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,779

    Re: Difficult Count if or Sum if problem

    Well, as long as your real data is in the same format, there shouldn't be a problem. Of course, if, as many do, you've forgotten something critical, don't be surprised if it doesn't.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  5. #5
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Difficult Count if or Sum if problem

    And to get back to basics we can also use this variation =COUNTIFS($B3:$O3,1,$A3:$N3,0)+--(B3=1)

+ 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. Count duplicates very difficult.
    By stephme55 in forum Excel General
    Replies: 4
    Last Post: 08-17-2016, 04:37 AM
  2. Difficult sort problem
    By iwannabakat in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-15-2014, 05:41 AM
  3. Difficult V Look up and if function together problem
    By tentop6521 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 01-23-2014, 04:00 PM
  4. a difficult problem
    By x taol in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-11-2006, 02:19 AM
  5. A Difficult Unconcatinate Problem
    By RestlessAde in forum Excel General
    Replies: 9
    Last Post: 01-24-2006, 09:15 PM
  6. Difficult Excel Problem
    By SpikeUK in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-22-2005, 07:31 PM
  7. Difficult PrintTitleRows problem
    By phreud in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-15-2005, 09:45 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