To Solution in the Excel can be made like this:
The cell A1 should have the value 4 (four) as it is the amount of items to compare (do not put another value here per hour, see the remarks below)
The cell D1 displays the number of the last row with data in its table (automatically)
The column B is only to separate the data visually.
The column C presents a default setting for each set of four values to be compared, including the line value itself and the following three values (adapt here if you use another number of items to compare, see the remarks below).
The column D displays the data line number
The column And displays the row number of the first occurrence in the data sequence of the value range corresponding to the values of the row itself, when repeated in the table (see remarks)
The column F presents each occurrence in the form you requested
The column H shows a specific cell
The column I describes the function of this cell or presents its formula
Remarks
If cell A1 is changed to a quantity of values other than four, the formulae in column C need to be adapted.
Column D presents a single occurrence per row, the next occurrence immediately following the current line, with no other occurrences if they exist, however, if they exist, the line with the second occurrence will point to the line of the third occurrence and so on...
With each new data row included or for several new rows included, the formulas contained in columns C, D, E and F must be copied and pasted in each of them, for this, just copy the range from C to F from one of the previous rows.
In the example presented new values will be added to yours to show two occurrences of two distinct sequences (lines 8 and 27) and at the same time, two occurrences of the same sequence (lines 2, 10 and 22)
These are the formulas to copy and paste:
=MÁXIMO(D2:D99999)
=A2&"|"&A3&"|"&A4&"|"&A5
=LIN()
=SE(OU(NÃO(ÉNÚM(INDIRETO("A"&(D2+$A$1-1))));ÉERROS(PROCV(C2;INDIRETO("C"&(D2+1)&":D"&$D$1);2;FALSO)));"";PROCV(C2;INDIRETO("C"&(D2+1)&":D"&$D$1);2;FALSO))
=SE(ÉNÚM(E2);"A"&D2&":A"&(D2+$A$1-1)&" = A"&E2&":A"&(E2+$A$1-1);"")
Do the test even for a spreadsheet with a lot of data, I have spreadsheets much more complex than this and with numerous data (rows and columns) and numerous formulas and there is no wait or delay for the processing of each new data entered (with the automatic calculation active)It may be the same for you.
you’ve thought about redoing this logic to another way, you could say which purpose of it?
– Thalles Daniel
it represents the weekly measurement of a substance in plants over a year and I want to find the equal intervals to know in which weeks they occurred. I do not know how to remake this logic otherwise and I thought in Excel(VBA) because the data are in this format. if you have any suggestions I will be grateful!
– Tati
Hi Tati, the solution I presented in Excel for your case was what you expected? Did you answer or help in any way? If yes, please mark the answer. There is a "Check" below the voting arrows on the upper left side of each answer for you to indicate the one that best served you. This is part of the question-and-answer process here in the community, as well as voting on questions and answers...
– Leo
Hi Leo...sorry but I could only access now...and apparently solves the problem yes...I will test and return comments.
– Tati