+ Reply to Thread
Results 1 to 3 of 3

Counting the number of red cells that follow the previous red cell diagonally

  1. #1
    Registered User
    Join Date
    02-11-2018
    Location
    Germany
    MS-Off Ver
    Office 2007
    Posts
    22

    Counting the number of red cells that follow the previous red cell diagonally

    I need a way to calculate the total number of red cells that follow the previous red cells ONLY diagonally. The cells that needs to be calculated
    are colored in red.

    (if it helps, you can assume reds as 1, and grays 0, but in the example below I colored 1s in white just to show which ones are counted).

    Here is a picture of sample data:

    data.png

    Here is some possible scenarios to clarify it.

    possible scenarios.png

    I hope I explained it, please ask if it isn't clear.
    I tried to find a solution with nested ifs but couldn't figure it out. Can someone help please? thanks.

  2. #2
    Forum Contributor jomaor1's Avatar
    Join Date
    10-08-2018
    Location
    Brasil
    MS-Off Ver
    Excel 2016
    Posts
    177

    Re: Counting the number of red cells that follow the previous red cell diagonally

    Hi,

    Without VBA, i don't think you can make it without using formulas or numbers inside the cells.

    So, considering your "TOTAL COUNTS" text is in cell "O2", put this on cell "O3":

    =COUNTIF(A3:L3,1)

    and pull the formula down.
    Last edited by jomaor1; 06-18-2019 at 03:41 PM.
    John.

    "I excel at jumping to conclusions"

  3. #3
    Registered User
    Join Date
    02-11-2018
    Location
    Germany
    MS-Off Ver
    Office 2007
    Posts
    22

    Re: Counting the number of red cells that follow the previous red cell diagonally

    Thanks, but I have already that formula in place.

+ 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. Replies: 3
    Last Post: 08-30-2018, 11:13 PM
  2. Follow-up question to previous post...How do I change a cell color when ...
    By artemus06 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-13-2017, 12:56 PM
  3. Auto populate cells with number according to previous cell
    By kcarth in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-29-2015, 01:19 PM
  4. Customer Records - does current value follow previous
    By dtl1975 in forum Excel General
    Replies: 7
    Last Post: 06-13-2014, 08:49 AM
  5. Counting number of non-blank cells for every nth cell
    By mqp92 in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 02-03-2013, 11:08 AM
  6. Counting only cells with the previous month
    By noobtoexcel in forum Excel General
    Replies: 1
    Last Post: 02-29-2012, 02:08 PM
  7. [SOLVED] counting number of times value is greater than previous week
    By tereasajw in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-19-2005, 10:55 AM

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