ArrayON_56
New Member
- Joined
- Jul 9, 2021
- Messages
- 9
- Office Version
- 2019
- Platform
- Windows
I'm new to VBA Excel programming.
I have a table with several headers and I would want to get absolute column number of some header.
To be more clear. There is a form to which user should enter header name (practically header cell content) and the program should get absolute column number where the header is placed in sheet. The column number will be parsed to next code which already exists.
Is there some simple way how to do it, or I have to cycle through each and check if cell(header) content equals to phrase I'm searching for?
Thanks.
PS: I was able to get only here: ActiveSheet.ListObjects("TranslationDataTable").ListColumns("<Some-Header-Name-Here>"), but it only returns content of the cell, and that is practically header name. TranslationDataTable is name of the table I'm searching in.
I have a table with several headers and I would want to get absolute column number of some header.
To be more clear. There is a form to which user should enter header name (practically header cell content) and the program should get absolute column number where the header is placed in sheet. The column number will be parsed to next code which already exists.
Is there some simple way how to do it, or I have to cycle through each and check if cell(header) content equals to phrase I'm searching for?
Thanks.
PS: I was able to get only here: ActiveSheet.ListObjects("TranslationDataTable").ListColumns("<Some-Header-Name-Here>"), but it only returns content of the cell, and that is practically header name. TranslationDataTable is name of the table I'm searching in.