Hello!
I've got a little issue here.
I am pasting data from a sheet into another sheet to order it there:
Well, that works, and it pastes 3 collumns of data with about 30 rows.
It might grow on the source, so i cannot lessen the copy range.
I wanted to sort the data on the paste side, but every time i do it, the ordering sends all the data on the bottom of a whole bunch of blank rows.
As i am looking at this, i see that it is ordering the ammount of cells previously pasted, even if no reference to them on the code..
Needed:
- order the data based on the "C" column value, from highest to lowest.
- set the data on the top ignoring blanks.
What it looks like after paste:
<tbody>
</tbody>
What it looks like after ordering:
<tbody>
</tbody>
What i need (ordered by the last column, other values are not important)
<tbody>
</tbody>
Any ideas will be much appreciated!
Best regards!
I've got a little issue here.
I am pasting data from a sheet into another sheet to order it there:
Code:
Sub Workbook_Open()
Application.ScreenUpdating = False
Worksheets("OrdLoj").Range("A9:C140").Copy
Worksheets("preplj").Range("A1").PasteSpecial Paste:=xlPasteValues
Application.ScreenUpdating = True
End Sub
Well, that works, and it pastes 3 collumns of data with about 30 rows.
It might grow on the source, so i cannot lessen the copy range.
I wanted to sort the data on the paste side, but every time i do it, the ordering sends all the data on the bottom of a whole bunch of blank rows.
As i am looking at this, i see that it is ordering the ammount of cells previously pasted, even if no reference to them on the code..
Needed:
- order the data based on the "C" column value, from highest to lowest.
- set the data on the top ignoring blanks.
What it looks like after paste:
store 1 | 0 | 12 |
store 2 | 1 | 10 |
store 3 | 1 | 7 |
store 4 | 1 | 6 |
store 5 | 0 | 10 |
store 6 | 0 | 11 |
store 7 | 0 | 11 |
<tbody>
</tbody>
What it looks like after ordering:
store 3 | 1 | 6 |
store 4 | 1 | 7 |
store 5 | 0 | 10 |
store 2 | 1 | 10 |
store 6 | 0 | 11 |
store 7 | 0 | 11 |
store 1 | 0 | 12 |
<tbody>
</tbody>
What i need (ordered by the last column, other values are not important)
store 1 | 0 | 12 |
store 6 | 0 | 11 |
store 7 | 0 | 11 |
store 5 | 0 | 10 |
store 2 | 1 | 10 |
store 4 | 1 | 7 |
store 3 | 1 | 6 |
<tbody>
</tbody>
Any ideas will be much appreciated!
Best regards!
Last edited by a moderator: