VBA Sorting Range

doctorcpu

New Member
Joined
Aug 27, 2016
Messages
12
Help sorting range using vba. I'm trying to sort two columns with formulas which has blanks as the result of the formulas. I'm trying to sort so that the blanks in the range are at the bottom and the sort is on cost highest to lowest. See example below

Any help is appreciated.
-------------------------Example--------------------------------
Before SortAfter Sort
QTYCostQTYCost
6126.254127.19
5123.836126.25
7122.465123.83
11113.977122.46
10121.19
9120.59
8119.53
3115.27
11113.97
1112.8
10121.192
3115.27
4127.19
9120.59
2
8119.53
1112.8

<tbody>
</tbody>

<tbody>
</tbody>
 
Last edited:

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
If you sort by column A first, let excel expand to column B when you click the sort button.
This will remove all the spaces in column A,
Then sort by column B, letting excel expand to column A
 
Upvote 0

Forum statistics

Threads
1,213,494
Messages
6,113,972
Members
448,537
Latest member
Et_Cetera

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