How to rename a column using VBA
strikas06
Posted messages
22
Status
Member
-
strikas06 Posted messages 22 Status Member -
strikas06 Posted messages 22 Status Member -
Hello everyone,
as a beginner in Excel, I would like to know how to replace the values in a column with the values attached to them. For example, in my first column, I have the values 1, 2, 3, 4, 5, 6, 7, 8, 9 and these numbers correspond to RESPECTIVE student names.
In fact, in another file (2), I have my Sheet1 with in column A the values 1, 2, 3, 4, 5, 6, 7, 8, 9 and in the same order, I have in column B the names of the students.
I would like a macro that will replace (in my first file) the numbers with the associated names by looking up the correspondence in Sheet1 of my second file.
It's a bit complicated but quite interesting to do! But I'm still not good enough to do it alone...
Thanks for any help, have a great day everyone.
as a beginner in Excel, I would like to know how to replace the values in a column with the values attached to them. For example, in my first column, I have the values 1, 2, 3, 4, 5, 6, 7, 8, 9 and these numbers correspond to RESPECTIVE student names.
In fact, in another file (2), I have my Sheet1 with in column A the values 1, 2, 3, 4, 5, 6, 7, 8, 9 and in the same order, I have in column B the names of the students.
I would like a macro that will replace (in my first file) the numbers with the associated names by looking up the correspondence in Sheet1 of my second file.
It's a bit complicated but quite interesting to do! But I'm still not good enough to do it alone...
Thanks for any help, have a great day everyone.
2 answers
Hi Michel!
Yes, actually using a macro will allow me to do this more quickly instead of dragging the formula each time... And it will take up less space in my file :).
Thank you for taking an interest in my question anyway!
Yes, actually using a macro will allow me to do this more quickly instead of dragging the formula each time... And it will take up less space in my file :).
Thank you for taking an interest in my question anyway!
Sorry to insist, but you write the formula in the column on the line of the first number and double-click on the small black square at the bottom right of the cell.
It will take up less space if your workbook exceeds 2 MB, otherwise, the gain is minimal.
Okay, I'll make you something in VBA since it seems to be a matter of life or death; a little patience
;o)
It will take up less space if your workbook exceeds 2 MB, otherwise, the gain is minimal.
Okay, I'll make you something in VBA since it seems to be a matter of life or death; a little patience
;o)