(Solved) – Loop through table headers in excel with vba

(solved)-–-loop-through-table-headers-in-excel-with-vba

For Each headerRange In tblStueckpreis.Range.Rows(1)
If tblStueckpreis.DataBodyRange.Cells.Value Like "*Staffel*" Then
numbersStaffel = numbersStaffel 1
End If
Next

I wanted to loop through the header of my table and check when the header says “Staffel”. I’ve tried a lot of things and it doesn’t work…
What am I doing wrong? Help me, please.

Leave a Reply

Your email address will not be published. Required fields are marked *