I have an error in my code but I don't know where... The thing is that I never know which name will be in the cells and I want it to be linked to the name of the sheet. I always have an error on line 6 but I don't know why. This is a part of my code:
For x = 0 To 10
Sheets("DataEntry").Select
nomfeuille = Cells(1, 3 + x).Value
Sheets("DataEntry").Select
date1 = Cells(2, 3 + x).Value
Sheets(nomfeuille).Select
col_date = Range("A1").End(xlToRight).Column + 1
Cells(1, col_date).Value = date1
For x = 0 To 10
Sheets("DataEntry").Select
nomfeuille = Cells(1, 3 + x).Value
Sheets("DataEntry").Select
date1 = Cells(2, 3 + x).Value
Sheets(nomfeuille).Select
col_date = Range("A1").End(xlToRight).Column + 1
Cells(1, col_date).Value = date1