Copy, sort, remove doubles, Cartesian product

kleanthis1

New Member
Joined
Feb 15, 2017
Messages
3
[FONT=&quot]Hello, [/FONT]


[FONT=&quot]I have a tricky question for you. After running several macros (more than 10) I come up with data like the ones that you see on the attached file. The output data is not the same every time, meaning that I may have 10 records one day, and 100 records on another day. [/FONT]

[FONT=&quot]What I want is:[/FONT]

[FONT=&quot]A macro or VBA that does all of the following:[/FONT]

[FONT=&quot]1) Copy ALL from column A to a new sheet8 at column H. [/FONT]
[FONT=&quot]2) Sort (ascending) and keep one number if there are doubles (remove doubles if any) at H column. If I have 55 twice, I want only one to be kept. [/FONT]
[FONT=&quot]3) If it is possible I want the doubles to be shown on the next column I because they play significant role later in other macros[/FONT]
[FONT=&quot]4) copy all the data between degrees 0 to 70 to the previous column G[/FONT]
[FONT=&quot]5) Copy the same data beneath on column G but multiplied by minus. If 5 degrees were copied from H column, the G column will have 10 degrees. 5 positive and 5 negative. [/FONT]
[FONT=&quot]6) at H column all the degrees to be copied beneath but multiplied by minus.[/FONT]
[FONT=&quot]7) at A column I want the Cartesian Product of all the data from G and H column. [/FONT]

[FONT=&quot]That's all!!!! :) I know that it is tricky but any help will be much appreciated !!!! Thank you in advance!!!

https://drive.google.com/open?id=0B-VauvwW5u_mMHQ0b21yRnB2c0E
[/FONT]
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Forum statistics

Threads
1,215,491
Messages
6,125,111
Members
449,205
Latest member
ralemanygarcia

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