+ Reply to Thread
Results 1 to 2 of 2

Calculate the number of consecutive results

  1. #1
    Registered User
    Join Date
    11-08-2016
    Location
    Madrid
    MS-Off Ver
    2007
    Posts
    1

    Calculate the number of consecutive results

    Hello,

    I hope you can give me a hand; I would greatly appreciate it. I hope I can explain myself well.

    I have a file with some columns, in one I have for the "Warehouse 1" three locations (Madrid, Sevilla and Barcelona), and for "Warehouse 2" the same places, although internally they are different warehouses. Then in two other columns, I have codes that correspond to each locality, according to each Warehouse. Everything is sorted by date.

    What I would like to calculate is the number of consecutive results that are produced per code "A" of each location, depending on the store, taking into account the previous rows, not the current cell containing the formula. The result would be displayed in several columns, on the one hand looking for only at Warehouse 1, for another looking for only at Warehouse 2, and finally for the two warehouses.

    If in the row of the cell, the immediately preceding one is not "A", then the result would be zero, even if there are older ones that do have "A". If, for example, the three previous rows have "A", i.e., they are consecutive, the result would be three, assuming that the fourth backwards would not be "A".

    I look for the previous cells that are consecutive, always containing "A", until it contains it, and I get the total result of the consecutive ones.


    I send the file with an example, which will surely be understood better than my explanation and in red colour with the result that should come out.

    Thank you very much for your help,

    Kind regards,

    Fran
    Attached Files Attached Files

  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
    43,986

    Re: Calculate the number of consecutive results

    I'm sorry, but I simply don't understand how your expected results were derived. can you have another go at explaining?
    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

+ 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. Highlghting 2 Consecutive Results By Group
    By Rob Murphy in forum Excel General
    Replies: 16
    Last Post: 11-09-2014, 04:51 PM
  2. [SOLVED] Puzzeling results from calculate number of weeks functions
    By Bobsone in forum Excel General
    Replies: 8
    Last Post: 10-21-2014, 03:56 PM
  3. Replies: 2
    Last Post: 08-29-2013, 02:57 AM
  4. [SOLVED] Calculate maximum number of consecutive populated cells in a column
    By Jimbobby in forum Excel General
    Replies: 9
    Last Post: 11-11-2012, 04:24 PM
  5. IF command resetting after 3 consecutive negative results
    By chachie22 in forum Excel General
    Replies: 2
    Last Post: 02-28-2011, 12:32 PM
  6. Paste Issue when AutoFilter Results are Consecutive
    By daddio_gone in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-02-2009, 09:24 AM
  7. Returning Numeric Results across a Single Row in Consecutive Cells
    By Sam via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-15-2006, 08:55 PM

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