Moderatori: Anthony47, Flash30005
Anthony47 ha scritto:Quale versione di Office usi?
=LET(bTAB;$A$2:$E$100;LFInit;I2;qt;TESTO.SUCCESSIVO(LFInit;"-");Lfor;SOSTITUISCI(LFInit;qt;TESTO(qt;"000000"));uuVal;UNICI(INDICE(bTAB;0;2)&INDICE(bTAB;0;3)&"-000000");UVAL;INDICE(bTAB;0;2)&INDICE(bTAB;0;3)&"-"&TESTO(INDICE(bTAB;0;4);"000000");nwTAB;DATI.ORDINA(STACK.VERT(uuVal;STACK.ORIZ(UVAL;bTAB)));CERCA.VERT(Lfor;nwTAB;6))
=TESTO.SUCCESSIVO(A2;"-")
Function MeleBananArr(ByRef LFor As Range, ByRef FTQC As Range) As Variant
Dim oArr(), w1Arr(), w2Arr(), myK As String, LfVal As String
Dim w2Ind As Long, I As Long, tmpStr As String, J As Long
ReDim w1Arr(1 To FTQC.Rows.Count)
ReDim w2Arr(1 To FTQC.Rows.Count * 2)
For I = 1 To FTQC.Rows.Count
myK = FTQC.Cells(I, 1) & FTQC.Cells(I, 2)
If IsError(Application.Match(myK, w1Arr, False)) Then
w2Ind = w2Ind + 1
w1Arr(I) = myK
w2Arr(w2Ind) = FTQC.Cells(I, 1) & FTQC.Cells(I, 2) & "-000000-0"
End If
w2Ind = w2Ind + 1
w2Arr(w2Ind) = FTQC.Cells(I, 1) & FTQC.Cells(I, 2) & "-" & Format(FTQC.Cells(I, 3), "000000") & "-" & FTQC.Cells(I, 4)
Next I
'Bubble sort
For I = 1 To w2Ind - 1
For J = I + 1 To w2Ind
If w2Arr(I) > w2Arr(J) Then
tmpStr = w2Arr(I)
w2Arr(I) = w2Arr(J)
w2Arr(J) = tmpStr
End If
Next J
Next I
ReDim oArr(1 To LFor.Rows.Count, 1 To 1)
For I = 1 To LFor.Rows.Count
If LFor.Cells(I, 1) <> "" Then
ival = Split(LFor.Cells(I, 1), "-", , vbTextCompare)(1)
LfVal = Replace(LFor.Cells(I, 1), ival, Format(ival, "000000"))
oArr(I, 1) = CSng(Split(w2Arr(Application.Match(LfVal, w2Arr)), "-", , vbTextCompare)(2))
Else
oArr(I, 1) = ""
End If
Next I
MeleBananArr = oArr
End Function
MeleBananeArr(IntervalloConLeStringheDaCercare; IntervalloDelleColonneF-T-Q-Costo)
=MeleBananArr(I2:I8;$B$2:$D$28)
Torna a Applicazioni Office Windows
Inserimento parziale valore cella in MessageBox Autore: Ricky0185 |
Forum: Applicazioni Office Windows Risposte: 6 |
Inserire add.in nella barra di avvio veloce in excel 2003 Autore: Ricky0185 |
Forum: Applicazioni Office Windows Risposte: 4 |
Excel: problema con date se devo unirle a testi Autore: valle1975 |
Forum: Applicazioni Office Windows Risposte: 5 |
Visitano il forum: Nessuno e 73 ospiti