The Solution in Excel can be done like this:
TheA1cellshouldhaveavalueof4(four),asitisthenumberofitemstocompare(donotputanothervaluehereperhour,seethecommentsbelow)
ThecellD1displaysthenumberofthelastrowwithdatainyourtable(automatically)
TheBcolumnisjustforseparatingthedatavisually.
TheCcolumnhasadefaultsettingforeachsetoffourvaluestobecompared,includingthevalueofthelineitselfandthefollowingthreevalues(adapthereifyouuseanotherquantityofitemstocompare,seethecommentsbelow).
TheDcolumndisplaysthedatalinenumber
TheEcolumndisplaysthelinenumberofthefirstoccurrenceinthedatasequenceoftherangeofvaluescorrespondingtothevaluesofthelineitself,whenthereisarepetitioninthetable(seenotes)
TheFcolumndisplayseachoccurrenceintheformyourequested
TheHcolumnshowsaspecificcell
TheIcolumndescribesthefunctionofthiscellordisplaysitsformula
Notes
IfcellA1ischangedtoanumberofvaluesotherthanfour,theformulasincolumnCwillneedtobeadapted.
ColumnDshowsasingleoccurrenceperline,thenextoccurrenceimmediatelyfollowingthecurrentline,withnootheroccurrencesiftheyexist,howeveriftheyexist,thelinewiththesecondoccurrencewillpointtothelineofthethirdoccurrenceandsoon...
Foreachnewdatalineincludedorforseveralnewrowsincluded,theformulascontainedincolumnsC,D,E,andFmustbecopiedandpastedintoeachofthembycopyingtheCtoFofoneofthepreviouslines.
Intheexamplepresentednewvaluesaddedtohistoshowtwooccurrencesoftwodistinctsequences(lines8and27)andatthesametimetwooccurrencesofthesamesequence(lines2,10and22)p>
Herearetheformulastocopyandpaste:
=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 same test for a spreadsheet with a lot of data, I have spreadsheets that are much more complex than this one and with numerous data (rows and columns) and numerous formulas and there is no waiting or delay for the processing of each new data inserted active automatic calculation), it may be the same for you.