Hi guys,
I'm quite new to Excel programming so I was wondering if someone could help me with this :
I developed this macros to open a txt file into xls, however, im only interested in some part of the data in those files, so id like to delete the rest in a simpler way than this:
Workbooks.OpenText Filename:= _ "C:\Directory" _ , Origin:=437, StartRow:=1, DataType:=xlFixedWidth, FieldInfo:=Array( _ Array(0, 1), Array(10, 1), Array(20, 1), Array(30, 1), Array(40, 1), Array(50, 1), Array(60 _ , 1), Array(70, 1), Array(80, 1)), TrailingMinusNumbers:=True Rows("1:46").Select Selection.Delete Shift:=xlUp Range("A1").Select
The blue part is the part id like to replaceRange("A1").Select Rows("701:2149").Select Selection.Delete Shift:=xlUp Rows("1401:2849").Select Selection.Delete Shift:=xlUp Rows("2101:3549").Select Selection.Delete Shift:=xlUp Rows("2801:4249").Select
you'll notice there is a relation between every set I want to delete
701+700 = 1401, 1401+700=2101 ......etc (top to bottom)
701+1448= 2149, 1401+1448=2849 ......etc (sideways, set of rows)
Any help would be much appreciated
Cheers,
Sol
Bookmarks