Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
data on top
hello ,
can anyone help with this, i have series of data segregated like this example: richard kenny smith john raju i want the output like this . i want smith to be positioned in the first place always and should not be repeated it should be like this smith richard kenny john raju can anyone help me with a formula thans |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
data on top
Select your list and run:
Sub smith() Dim savit() ReDim savit(Selection.Count) i = 0 foundit = False For Each r In Selection With r If .Value = "smith" Then foundit = True Else savit(i) = .Value i = i + 1 End If End With Next If foundit Then i = 0 j = 0 For Each r In Selection If j = 0 Then Selection.Cells(1) = "smith" j = 1 Else r.Value = savit(i) i = i + 1 End If Next End If End Sub -- Gary''s Student - gsnu2007 " wrote: hello , can anyone help with this, i have series of data segregated like this example: richard kenny smith john raju i want the output like this . i want smith to be positioned in the first place always and should not be repeated it should be like this smith richard kenny john raju can anyone help me with a formula thans |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
data on top
On Sep 18, 8:28 pm, Gary''s Student
wrote: Select your list and run: Sub smith() Dim savit() ReDim savit(Selection.Count) i = 0 foundit = False For Each r In Selection With r If .Value = "smith" Then foundit = True Else savit(i) = .Value i = i + 1 End If End With Next If foundit Then i = 0 j = 0 For Each r In Selection If j = 0 Then Selection.Cells(1) = "smith" j = 1 Else r.Value = savit(i) i = i + 1 End If Next End If End Sub -- Gary''s Student - gsnu2007 " wrote: hello , can anyone help with this, i have series ofdatasegregated like this example: richard kenny smith john raju i want the output like this . i want smith to be positioned in the first place always and should not be repeated it should be like this smith richard kenny john raju can anyone help me with a formula thans- Hide quoted text - - Show quoted text - hi gary , thanks a lot .. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Increase Your Business By Data Conversion, Data Format and Data EntryServices in India | Excel Worksheet Functions | |||
Save 20% On Data Conversion and Data Formats Services by Data EntryIndia | Excel Discussion (Misc queries) | |||
Data Entry Online, Data Format, Data Conversion and Data EntryServices through Data Entry Outsourcing | Excel Discussion (Misc queries) | |||
Import Data / Edit Data / Export Data in Excel | Excel Programming | |||
MULTIPLE DATA - How to insert new data into existing data.... | Excel Discussion (Misc queries) |