Determine the first non-empty column
pepsister
-
f894009 Posted messages 17417 Registration date Status Member Last intervention -
f894009 Posted messages 17417 Registration date Status Member Last intervention -
Hello,
I have a pivot table and I’m trying to determine the first non-empty column (excluding column A which contains the title).
I tried the following formula:
Colonne = Cells(Ligne, 2).End(xlToLeft).Column
but it always returns 1, i.e., the first column. It’s as if I can’t move to column 2, it doesn’t respect my parameters in Cells.
How can I do this? I also tried with a Range("C2"), for example, but it’s the same, it returns Colonne=1.
Thank you for your help.
I have a pivot table and I’m trying to determine the first non-empty column (excluding column A which contains the title).
I tried the following formula:
Colonne = Cells(Ligne, 2).End(xlToLeft).Column
but it always returns 1, i.e., the first column. It’s as if I can’t move to column 2, it doesn’t respect my parameters in Cells.
How can I do this? I also tried with a Range("C2"), for example, but it’s the same, it returns Colonne=1.
Thank you for your help.