I have a workbook (well a host of workbooks) I need to import. The thing is, the headers aren't always in the same column. They are however always the same name.
I'm currently using a find to get the positions of the columns I need to then retrieve the data I want.
Something along the lines of:
I was wondering if there was a (faster) alternative? Aside from having the reports sent in the same format?
I'm currently using a find to get the positions of the columns I need to then retrieve the data I want.
Something along the lines of:
Code:
For ii = lbound(aHeaders) to ubound(aHeaders)
Set rHeader = wbSrc.sheets("Data").rows(1).specialcells(xlcelltypeconstants).find(aHeaders(ii),,,xlWhole)
If not rHeader is nothing then
...perform calcs..
End if
Next ii
I was wondering if there was a (faster) alternative? Aside from having the reports sent in the same format?