Is it possible to create a macro in VB codes to select certain columns based on row heading in Microsoft Excel?
Basically, I need the macro to select the whole column of "Account" before proceeding to do some other formatting just for this column.
Reason i need to macro this is because i have >10 excel files to format, but the column Account always appear in different columns for different files.
Eg File1, i will need to do this: Range("B:B").Select
Type Account Description
Main 1580 Testing
Sub 1480 Test
Main 1111 ABC
For File2, i will need to do this : Range("A:A").Select
Account Admin
1580 X
1480 Y
1111 Z
I've been trying to find the codes to do this, but to no avail .. Can anyone help please?
Basically, I need the macro to select the whole column of "Account" before proceeding to do some other formatting just for this column.
Reason i need to macro this is because i have >10 excel files to format, but the column Account always appear in different columns for different files.
Eg File1, i will need to do this: Range("B:B").Select
Type Account Description
Main 1580 Testing
Sub 1480 Test
Main 1111 ABC
For File2, i will need to do this : Range("A:A").Select
Account Admin
1580 X
1480 Y
1111 Z
I've been trying to find the codes to do this, but to no avail .. Can anyone help please?