PC Review


Reply
 
 
k743911@gmail.com
Guest
Posts: n/a
 
      18th Sep 2007
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

 
Reply With Quote
 
 
 
 
=?Utf-8?B?R2FyeScncyBTdHVkZW50?=
Guest
Posts: n/a
 
      18th Sep 2007
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


"(E-Mail Removed)" 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
>
>

 
Reply With Quote
 
k743911@gmail.com
Guest
Posts: n/a
 
      19th Sep 2007
On Sep 18, 8:28 pm, Gary''s Student
<GarysStud...@discussions.microsoft.com> 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
>
>
>
> "k743...@gmail.com" 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Save 60% on Data Entry, Data Conversion, Data Processing Services byOffshore-Data-Entry dataentryoffshore@gmail.com Microsoft Excel Programming 0 4th Jun 2008 04:02 PM
Save 60% on Data Entry, Data Conversion, Data Processing Services byOffshore-Data-Entry dataentryoffshore@gmail.com Microsoft Excel Programming 0 4th Jun 2008 04:00 PM
Professional Data Conversion,Data Formats and Affordable Data EntryServices by Data Entry India Data Entry India Microsoft Access Form Coding 0 31st Mar 2008 11:50 AM
Data Entry Online, Data Format, Data Conversion and Data EntryServices through Data Entry Outsourcing admin.dataentryoutsourcing@gmail.com Microsoft Excel Misc 0 20th Mar 2008 12:45 PM
Data Entry Online, Data Format, Data Conversion and Data EntryServices through Data Entry Outsourcing admin.dataentryoutsourcing@gmail.com Microsoft Access Form Coding 0 20th Mar 2008 12:44 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:27 AM.