I have a csv file I have recorded a macro for to manipulate the data of the CSV file as I need it. Part of the macro looks for a cell containing the text "month index". Once this cell is located, a range is selected (A9,B50) for example. The problem is, the "month index" cell can be located in A7, A8, A11 etc so the macro pulls the wrong data if the cell reference is difference. The range I select is consistent once "month index" is found so I think I can use the offset instruction in someway but not sure.
Currently my Macro that handles this bit looks like this:
Range("A1").Select
Cells.Find(What:="month index", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
Range("A9:B9").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Cut
- Can anyone help me figure this out?