T
Tom Walat
XL2000, Windows NT 4
I have two instances in a worksheet where I need a macro to
join several rows in column A.
In the first instance, the first row I want to select
generally starts with or contains the string "E--" (without
quotemarks) in the first row. The selection of rows should end before
a row that contains several spaces and the string "YTD" (without
quotemarks). I have a macro to join the selected rows but I'm not sure
how to make the proper selection.
In the second instance, the next section of rows I want joined
generally starts with or contains the string "WP--" and ends with a
row that starts with or contains the string "T--"
Lastly, I need to select consecutive rows in column A that
start with a row that contains the string "IP" and goes down until a
row that contains the string "--". I want to select all the rows
between except the one with the "--" string. (With the selection made,
I want to use TextToColumns on this selection with the parameters as:
DataType:=xlFixedWidth, _
FieldInfo:=Array(Array(0, 1), Array(32, 1), Array(35, 1),
Array(40, 1), Array(43, 1), _
Array(47, 1), Array(51, 1), Array(55, 1), Array(60, 1))
Thanks for any help in advance.
- Tom
I have two instances in a worksheet where I need a macro to
join several rows in column A.
In the first instance, the first row I want to select
generally starts with or contains the string "E--" (without
quotemarks) in the first row. The selection of rows should end before
a row that contains several spaces and the string "YTD" (without
quotemarks). I have a macro to join the selected rows but I'm not sure
how to make the proper selection.
In the second instance, the next section of rows I want joined
generally starts with or contains the string "WP--" and ends with a
row that starts with or contains the string "T--"
Lastly, I need to select consecutive rows in column A that
start with a row that contains the string "IP" and goes down until a
row that contains the string "--". I want to select all the rows
between except the one with the "--" string. (With the selection made,
I want to use TextToColumns on this selection with the parameters as:
DataType:=xlFixedWidth, _
FieldInfo:=Array(Array(0, 1), Array(32, 1), Array(35, 1),
Array(40, 1), Array(43, 1), _
Array(47, 1), Array(51, 1), Array(55, 1), Array(60, 1))
Thanks for any help in advance.
- Tom