Notifications
Clear all
VBA & Macros
3
Posts
3
Users
0
Reactions
145
Views
Topic starter
Is there a VBA function that will determine if the current excel file contains a header row?
Thanks
Mike
Posted : 14/10/2021 1:19 pm
How would you distinguish a header row from a data row specifically?
Posted : 15/10/2021 10:30 am
If you're using ListObjects (Table) then it's easy but the other option is for you you say whay you think distinguishes the row you hav as the header row.
You could say that you can check the row with the most columns filled is the header row, so loop down let's say the first 5 rows (or more) and the one with the largest column number filled could be the header row, and also make sure the count is all contiguous cells in that row filled.
If you have column number 26 (Z) then the COUNTA() for that range should be 26 too
Hope my I've explained my idea
Posted : 25/10/2021 10:11 am