si esatto,
se posso stasera vedo di fare qualcosa altro,
eventualmente comincia a sistemare quelle dopo la materia Telecomunicazioni,
così io faccio la prima parte( Informatica) ne ho sistemate già un migliaio,
in 2 si fa prima.
Moderatori: Anthony47, Flash30005
Sub ShuffQuest()
Dim VArr(), LastA As Long, OArr(), I As Long, J As Long, K As Long, CQNum As Long, LastCQN As Long
Dim isQuest As Boolean, isResp As Boolean, isTit As Boolean
'
Sheets("Table 1").Select
LastA = Cells(Rows.Count, 1).End(xlUp).Row
ReDim VArr(1 To LastA)
ReDim OArr(1 To LastA, 1 To 6)
VArr = Range("A1").Resize(LastA, 1).Value
For I = 1 To LastA
VArr(I, 1) = Replace(VArr(I, 1), Chr(160), " ")
If VArr(I, 1) = "" Then GoTo SkipI
isResp = False: isQuest = False: isTit = False
If IsNumeric(Left(VArr(I, 1), 5)) Then
isQuest = True
ElseIf Left(Trim(VArr(I, 1)), 2) = "A)" Then
isResp = True
ElseIf Left(Trim(VArr(I, 1)), 2) = "B)" Then
isResp = True
ElseIf Left(Trim(VArr(I, 1)), 2) = "C)" Then
isResp = True
ElseIf Left(VArr(I, 1), 3) <> " " Then
isTit = True
End If
If isQuest Then
J = J + 1: K = 3
OArr(J, 1) = VArr(I, 1)
OArr(J, 2) = I
CQNum = CLng(Left(VArr(I, 1), 5))
If CQNum <> (1 + LastCQN) Then OArr(J, 3) = "SeqErr"
LastCQN = CQNum
ElseIf isResp And K < 6 Then
K = K + 1
OArr(J, K) = Trim(VArr(I, 1))
ElseIf isTit Then
J = J + 1: LastCQN = 0
OArr(J, 1) = "### " & VArr(I, 1)
ElseIf Not isTit And Not isQuest And Not isResp Then
J = J + 1: K = 7
OArr(J, 1) = "ORR " & VArr(I, 1)
OArr(J, 2) = I
OArr(J, 3) = "SeqErr"
End If
SkipI:
Next I
Sheets("Mixed").Cells.ClearContents
Sheets("Mixed").Range("A1").Resize(J, 6).Value = OArr
End Sub
Torna a Applicazioni Office Windows
Excel: formula automatica per evidenziare prodotto scaduto Autore: gamma_ray |
Forum: Applicazioni Office Windows Risposte: 3 |
Salvare file excel in formato html escludendo le immagini Autore: systemcrack |
Forum: Applicazioni Office Windows Risposte: 6 |
formula excel non visualizza risultato Autore: tommasog |
Forum: Applicazioni Office Windows Risposte: 6 |
Excel 2016 - Funzione SCARTO + INDIRETTO Autore: pl1957 |
Forum: Applicazioni Office Windows Risposte: 2 |
Visitano il forum: Marius44 e 56 ospiti