PDA

View Full Version : Check for headers in Excel



jackmeme
12-03-2017, 11:21 PM
Hi all,

Excel automatically detect headers in the file. To know whether the file has headers, you can go over to Data, Sort, and check if "My Data has Headers" is checked. Is there a way to find out if a file has headers via macro?

Thanks

Kenneth Hobs
12-04-2017, 10:52 AM
Welcome to the forum!

Headers is a relative term. 1, 2, 3 would not be a "header" as Excel would guess. 1, 2, 3a would be a header since one cell value (3a) in the "first" row of the data block is not numeric.