Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sorting rows and columns using VBA
Hi
Can anyone tell me how to do this :- From : Empty Locations U-Sites: U1H1, U3B2, U5C1 U7C1, U7E1 Q-Sites: Q1D1, Q1D3 To : Empty Location U1H1 Empty Location U3B2 Empty Location U5C1 Empty Location U7C1 Empty Location U7E1 Empty Location Q1D1 Empty Location Q1D3 Using VBA. Thanks. --- Message posted from http://www.ExcelForum.com/ |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sorting rows and columns using VBA
Sub test()
Dim rngSource As Range, rngDest As Range Dim rng As Range, arr() As String, i As Long Set rngSource = Range("A1:A5") Set rngDest = Range("B1") For Each rng In rngSource If Not Right(rng.Value, 1) = ":" Then arr = Split(rng.Value, ",") For i = LBound(arr) To UBound(arr) rngDest.Value = "Empty Location " & Trim(arr(i)) Set rngDest = rngDest.Offset(1, 0) Next End If Next End Sub -- Rob van Gelder - http://www.vangelder.co.nz/excel "vedrah " wrote in message ... Hi Can anyone tell me how to do this :- From : Empty Locations U-Sites: U1H1, U3B2, U5C1 U7C1, U7E1 Q-Sites: Q1D1, Q1D3 To : Empty Location U1H1 Empty Location U3B2 Empty Location U5C1 Empty Location U7C1 Empty Location U7E1 Empty Location Q1D1 Empty Location Q1D3 Using VBA. Thanks. --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sorting rows and columns using VBA
how do i put Empty Location and U1H1 etc in separate columns
-- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sorting Rows/Columns Automatically | Excel Worksheet Functions | |||
Sorting Rows/Columns Automatically | Excel Worksheet Functions | |||
sorting out columns but only for some rows | Excel Discussion (Misc queries) | |||
How to keep rows together when sorting columns? | Excel Worksheet Functions | |||
Sorting rows AND columns | Excel Worksheet Functions |