I have the first row with some headers in about 12 columns and I need to search for specific headers from 1d array.
Code: Select all
a = Array("Header3", "Header5", "Header10")
For Each c In Range("A1").CurrentRegion.Rows(1).Cells
x = Application.Match(c.Value, a, 0)
If Not IsNumeric(x) Then
ReDim Preserve s(n)
s(n) = c.Column
n = n + 1
Else
ReDim Preserve t(k)
t(k) = c.Column
k = k + 1
End If
Next c
Code: Select all
ar = Split(Join(s, ",") & "," & Join(t, ","), ",")
The question posted here too
https://chandoo.org/forum/threads/reord ... ray.46965/