Re : comparateur prix compagnie
Comprend pas bien pourquoi effacer ligne I15-N15
Pour le reste essaie en recopiant ce code à la place de celui présent dans le module 1
Sub recherche()
Application.ScreenUpdating = False
Sheets("PRICINGCIE").Activate
Columns("A:BH").Select
Selection.EntireColumn.Hidden = False
Range("H1:BH1").Select
Selection.Interior.Color = xlNone
Range("H1:V24").ClearContents
iata = Range("C4").Value
DGR = Range("C7").Value
col = 8
For Each sht In ActiveWorkbook.Sheets
a = sht.Name
If DGR = "NON" And Left(sht.Name, 2) = "GC" Then debfeuil = "GC"
If DGR = "OUI" And Left(sht.Name, 2) = "DG" Then debfeuil = "DG"
If Left(sht.Name, 2) = debfeuil Then
ligne = ""
adresse = ""
Sheets(sht.Name).Activate
Set Plage = Range("D5
300")
With Plage
Set c = .Find(iata)
If Not c Is Nothing Then
adresse = c.Address
ligne = c.Row
End If
End With
If adresse = "" Then GoTo suite
'Stop
With Sheets("PRICINGCIE")
colonne = Split(Columns(col).Address(ColumnAbsolute:=False), ":")(1)
If debfeuil = "GC" Then entete = Right(a, Len(a) - 2) Else entete = Right(a, Len(a) - 3)
.Range(colonne & 1) = entete
.Range(colonne & 3) = Range("T1").Value
.Range(colonne & 4) = Range("R1").Value
.Range(colonne & 5) = Cells(ligne, 5)
.Range(colonne & 6) = Range("AX" & ligne)
.Range(colonne & 16) = Range("R" & ligne)
.Range(colonne & 17) = Range("W" & ligne)
.Range(colonne & 18) = Range("AR" & ligne)
.Range(colonne & 19) = Range("AT" & ligne)
.Range(colonne & 20) = Range("AV" & ligne)
.Range(colonne & 21) = Range("V" & ligne)
.Range(colonne & 22) = Range("AC" & ligne)
.Range(colonne & 23) = Range("AU" & ligne)
.Range(colonne & 24) = Range("AW" & ligne)
Range(Cells(ligne, 8), Cells(ligne, 16)).Copy
Sheets("PRICINGCIE").Activate
Range(colonne & 7).Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
End With
col = col + 1
couleur = ""
With Sheets("2COD")
Set Plage = .Range("H5:H10000")
With Plage
a = Range(colonne & 1)
Set c = .Find(Range(colonne & 1))
If Not c Is Nothing Then
couleur = c.Interior.ColorIndex
a = c.Address
End If
End With
End With
If couleur = "" Then GoTo suite
Range(colonne & 1).Select
With Selection.Interior
.ColorIndex = couleur
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With
suite:
End If
Next
colonne = Split(Columns(col).Address(ColumnAbsolute:=False), ":")(1)
colonne2 = Split(Columns(60).Address(ColumnAbsolute:=False), ":")(1)
Sheets("PRICINGCIE").Select
Range("H5:BH6").Select
Selection.Font.Bold = True
Columns(colonne & ":" & colonne2).Select
Selection.EntireColumn.Hidden = True
End Sub