How to sort x,y, z data first by y and then by x

jdbaba

Board Regular
Joined
Sep 24, 2010
Messages
52
Hi All,

I have a set of data with x, y, and z.

I want to sort this data set first y and then x. I was using plotit software to create contours and it says "Must be sorted on Y then X".

Could anybody help me to do this ?

Sample data looks like this:

ColA ColB ColC

3419962.83 408357.75 33.22
3419992.85 408400.50 33.23
3420022.25 408440.20 33.10
3420053.08 408480.70 32.58
3420006.90 408341.75 33.23
3420029.73 408380.30 33.23
3420055.48 408418.18 33.11
3420084.60 408458.15 32.60
3420049.08 408324.18 33.41
3420069.38 408358.33 33.45
3420093.23 408393.85 33.35
3420121.18 408432.68 32.74
3420091.30 408302.00 33.42
3420111.75 408332.00 33.46
3420135.68 408365.33 33.34
3420163.68 408403.18 32.75
3420132.18 408272.05 33.42
3420155.28 408299.68 33.46
3420181.55 408331.63 33.32
3420212.20 408369.38 32.75
3420170.38 408233.75 33.42
3420198.08 408260.80 33.46
3420228.35 408291.93 33.27
3420264.08 408329.85 32.66
3420207.15 408188.98 33.42
3420239.25 408215.78 33.46
3420273.18 408245.65 33.19
3420313.03 408281.40 32.58
3420243.83 408139.60 33.43
3420278.85 408165.95 33.46
3420314.78 408194.40 33.10
3420355.05 408226.38 32.54
3420280.15 408087.10 33.43
3420317.30 408113.48 33.46
3420354.33 408141.88 33.05
3420393.38 408172.65 32.53
3420314.28 408031.28 33.42
3420354.95 408060.33 33.45
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Hi Smiley013,

Thanks for your reply but when I do this then the X is not sorted from smallest to largest. I am giving a sample data. This is the format I want my data. For doing this, I think some of the data needs to be deleted or whatever I am not sure.

X Y Z

0 0 1.1287828449724e-009
0.10125806182623 0 0.00038596306694672
0.20251612365246 0 2.2163359972183e-005
0.30377417802811 0 0.00012688245624304
0.40503224730492 0 -5.0678212573985e-005
0.50629031658173 0 0.00023452923051082
0.60754835605621 0 -0.00019407014769968
0.7088063955307 0 0.00038360958569683
0.81006443500519 0 -0.00039526875480078
0.91132247447968 0 0.00057305005611852
1.0125805139542 0 -0.00061559077585116
1.1138385534286 0 0.00076646177330986
1.2150965929031 0 -0.00081441289512441
1.3163546323776 0 0.00094821024686098
1.4176126718521 0 -0.00098234880715609
1.5188707113266 0 0.0010378521401435
1.6201287508011 0 -0.0010337120620534
1.7213867902756 0 0.0010900993365794
1.8226448297501 0 -0.0010454233270139
1.9239028692245 0 0.0010465307859704
2.0251610279083 0 -0.00096556899370626
2.1264190673828 0 0.00092174322344363
2.2276771068573 0 -0.0008148843771778
2.3289351463318 0 0.00074165628757328
2.4301931858063 0 -0.00063994585070759
2.5314512252808 0 0.00053680676501244
2.6327092647552 0 -0.00098887225612998
2.7339673042297 0 -4.5498140934797e-006
2.8352253437042 0 0.00060160900466144
2.9364833831787 0 0.00015526884817518
3.0377414226532 0 0.00020938483066857
3.1389994621277 0 1.5228989624916e-008
0 0.20258064568043 0.1934268027544
0.10125806182623 0.20258064568043 0.20037950575352
0.20251612365246 0.20258064568043 0.20262594521046
0.30377417802811 0.20258064568043 0.20230653882027
0.40503224730492 0.20258064568043 0.20177626609802
0.50629031658173 0.20258064568043 0.19733208417892
0.60754835605621 0.20258064568043 0.19282479584217
0.7088063955307 0.20258064568043 0.18404959142208
0.81006443500519 0.20258064568043 0.17588083446026
0.91132247447968 0.20258064568043 0.16327172517776
1.0125805139542 0.20258064568043 0.15187309682369
1.1138385534286 0.20258064568043 0.13581143319607
1.2150965929031 0.20258064568043 0.12164944410324
1.3163546323776 0.20258064568043 0.10285258293152
1.4176126718521 0.20258064568043 0.086516328155994
1.5188707113266 0.20258064568043 0.065810427069664
1.6201287508011 0.20258064568043 0.048121921718121
1.7213867902756 0.20258064568043 0.02622084505856
1.8226448297501 0.20258064568043 0.0075756399892271
1.9239028692245 0.20258064568043 -0.014589670114219
2.0251610279083 0.20258064568043 -0.033270731568336
 
Upvote 0

Forum statistics

Threads
1,224,581
Messages
6,179,668
Members
452,936
Latest member
anamikabhargaw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top