Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanx... it worked !!!
I was getting warning to replace rows while the system was performing text to column. I set the warning to FALSE in the beginning and TRUE at the end. Thank you very much On Oct 12, 1:19*am, "Peter T" <peter_t@discussions wrote: Have a go with this Sub DelAndSort2() * * Range("A:A,C:C,E:F").Delete * * ' copy values in col-B to col-C * * Range("C:C").Value = Range("B:B").Value * * ' text to columns, "-" separator * * Range("C:C").TextToColumns Destination:=Range("C1"), _ * * * * * * DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, _ * * * * * * ConsecutiveDelimiter:=False, Tab:=False, Semicolon:=False, _ * * * * * * Comma:=False, Space:=False, Other:=True, OtherChar:="-", _ * * * * * * FieldInfo:=Array(Array(1, 1), Array(2, 1)), TrailingMinusNumbers:=True * * Range("C1") = "Temp" ' ensure there's a header cell * * ' sort on col C * * Columns("A:D").Sort Key1:=Range("C2"), _ * * * * * * * * * * * * Order1:=xlAscending, Header:=xlYes, _ * * * * * * * * * * * * OrderCustom:=1, MatchCase:=False, _ * * * * * * * * * * * * Orientation:=xlTopToBottom, _ * * * * * * * * * * * * DataOption1:=xlSortNormal * * Range("C:D").Delete End Sub Regards, Peter T |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
i AM CREATING A DATA AND WANT TO SORT, BUT KEEP DATA TOGETHER | Excel Worksheet Functions | |||
Email downloads into a single Excel cell - data separation reqd. | Excel Programming | |||
Junk Characters in Excel Documents | Excel Discussion (Misc queries) | |||
Creating a graph with existing data...clear data after save | Excel Programming | |||
delete blocked senders messages on receipt why junk mail them? | Excel Discussion (Misc queries) |