Computing.Net > Forums > Office Software > question on sort

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

question on sort

Reply to Message Icon

Name: jds
Date: July 16, 2004 at 10:41:22 Pacific
OS: windowsXP
CPU/Ram: petium III/ram 256
Comment:

Hi,
I have 2 sets of data.
set1:a,b,c,d,e,f
set2:a,c,d,f
how can I sort it into 2 columns like this:
a a
b
c c
d d
e
f f

Thanks



Sponsored Link
Ads by Google

Response Number 1
Name: Bryco
Date: July 16, 2004 at 14:08:08 Pacific
Reply:

It appears to be a simply request but in my eyes it is not unless I am just not thinking correctly at the moment.

I have sent you a worksheet "FindNth1.xls"
It contains a macro and much instructions.
The macro modified by me was originally created by Dave Hawley of OzGrid.com for another purpose.

Also, if you had ten sets of data then you can add more columns and just need to change the occurance to 2, 3, 4...etc to return the correct values.

If your sets of data was an example and the value that you wanted to return was in another column then you need to change that within the formula too.

If you have the need to use the macro often I suggest you open it and save it as a Template for easy access.
If you don't want your spreadsheet to contain the macro then simply open the template and the User defined function will be available in your worksheet too. Otherwise you can copy the sheet from within the workbook and paste it to another workbook when you are done with it.

If you have questions I should be able to assist.

Regards,
Bryan



0

Response Number 2
Name: jds
Date: July 16, 2004 at 15:06:23 Pacific
Reply:

Thanks Bryan.
You are right. It not a simply request at least not easy for me.
I still haven't received your email yet. could you please zip it up and send again? It may be blocked
many thanks


0

Response Number 3
Name: Bryco
Date: July 16, 2004 at 15:35:31 Pacific
Reply:

Yes, it came back as Delivery failure.

I zipped it and resent it.

If you do save the file as a template then use the name FindNth vs FindNth1.

Bryan


0

Response Number 4
Name: Bryco
Date: July 16, 2004 at 19:49:49 Pacific
Reply:

That's two strikes.
Do you want to go for three on that same address, provide another address or call it quits now?

Bryan


0

Response Number 5
Name: Bryco
Date: July 17, 2004 at 03:39:22 Pacific
Reply:

I don't know why I was attempting to email it.
It is available at the following link by right clicking and selecting "Save target as":
FindNth.zip

Let me know once you have it so I can remove it from my webspace.

Best regards,
Bryan


0

Related Posts

See More



Response Number 6
Name: jds
Date: July 19, 2004 at 11:05:03 Pacific
Reply:

Thanks Bryan.
I got it from your link. It wroks great.
Thanks a lot.
Can I ask a futher question? I'd like expended on sort not for just one column,but a group of columns. Something like this:
data1 data2
a 50 a 50
b 40 b 45
c 30
d 20 d 15
e 10
f 5 f 55

Thanks in advance


0

Response Number 7
Name: jds
Date: July 19, 2004 at 11:19:46 Pacific
Reply:

Oh! forgot to ask what is the user defined function--FindNth, How can I see the code?

Thanks


0

Response Number 8
Name: Bryco
Date: July 19, 2004 at 11:50:32 Pacific
Reply:

Not sure exactly what you are wanting above without seeing but if I understand correctly then the result would need to look like:
A B C (columns)
a 50 50
b 40 45
c 30
d 20 15
e 10
f 5 55

Column A would be what you are looking for, column B would be the first occurance and column C would be the second occurance of values associated with the values in column A.

Being a User Defined Function (UDF) it shows up in the fx button's menu.
To view it's code hit Alt+F11.

Regards,
Bryan


0

Response Number 9
Name: jds
Date: July 19, 2004 at 13:09:40 Pacific
Reply:

Got it.
Thank you very much for your help Bryan


0

Response Number 10
Name: Bryco
Date: July 19, 2004 at 18:47:17 Pacific
Reply:

Glad I could help.

You are very welcome.

Bryan


0

Sponsored Link
Ads by Google
Reply to Message Icon

import xls file Word Page 1 printing to w...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Office Software Forum Home


Sponsored links

Ads by Google


Results for: question on sort

Documents open on second try www.computing.net/answers/office/documents-open-on-second-try/4699.html

Registering user's Email on Website www.computing.net/answers/office/registering-users-email-on-website/1848.html

question on rand 50 50 www.computing.net/answers/office/question-on-rand-50-50/3803.html