Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
need macro help
I need a macro to do so:
I have a table of data like this 123 TT 34.12 200 TT 45.25 180 TT 39.50 250 SV 41.00 250 SV 55.00 310 XR 12.88 i need to cut every lines that belong to TT and place them at new worksheet(tab) that called TT next, i need to cut every lines that belong to SV and place them at new worksheet(tab) that called SV ect.... comments : i dont know how math lines there thanks for your help |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
need macro help
Sub Test()
Dim sh As Worksheet Dim stemp As String Dim rng As Range Dim i As Long Set sh = ActiveSheet Do While Range("B1").Value < "" stemp = Range("B1") Set rng = Rows(1) i = 2 Do While Cells(i, "B") < "" If Cells(i, "B").Value = stemp Then Set rng = Union(rng, Rows(i)) End If i = i + 1 Loop Worksheets.Add.Name = stemp rng.Copy Worksheets(stemp).Range("A1") rng.Delete sh.Activate Loop End Sub -- HTH Bob Phillips wrote in message ups.com... I need a macro to do so: I have a table of data like this 123 TT 34.12 200 TT 45.25 180 TT 39.50 250 SV 41.00 250 SV 55.00 310 XR 12.88 i need to cut every lines that belong to TT and place them at new worksheet(tab) that called TT next, i need to cut every lines that belong to SV and place them at new worksheet(tab) that called SV ect.... comments : i dont know how math lines there thanks for your help |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
need macro help
See Ron de Bruin's site. He has sample code for situations similar to this.
http://www.rondebruin.nl/tips.htm more specifically probably a modification of one of these: http://www.rondebruin.nl/copy5.htm -- Regards, Tom Ogilvy wrote in message ups.com... I need a macro to do so: I have a table of data like this 123 TT 34.12 200 TT 45.25 180 TT 39.50 250 SV 41.00 250 SV 55.00 310 XR 12.88 i need to cut every lines that belong to TT and place them at new worksheet(tab) that called TT next, i need to cut every lines that belong to SV and place them at new worksheet(tab) that called SV ect.... comments : i dont know how math lines there thanks for your help |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
how to count/sum by function/macro to get the number of record to do copy/paste in macro | Excel Programming | |||
macro to delete entire rows when column A is blank ...a quick macro | Excel Programming | |||
Start Macro / Stop Macro / Restart Macro | Excel Programming |