How to make certain results appear at the beginning of SORT, followed by all other results?

Rnkhch

Well-known Member
Joined
Apr 28, 2018
Messages
578
Office Version
  1. 365
Platform
  1. Windows
Hello,

I have some data for "drug_level", that I need to sort based on the day column, but I want the first two results to always correspond to the drug_level on the "screening" and "baseline" days, and then all other days sorted in increasing order. Also if there are more than one values for a certain day, I want them to be averaged. Here is an example XL2BB:

Book1
ABCDEFG
1Before sortAfter sort
2DayDrug_LevelDayDrug_Level
328620223screening6191016
467951988baseline1238085
53812087228620223
69120902838120872
7baseline55490705932997
87126222866792422
914106130071262228
10screening123808592159194
11303373614925183.5
12223576752223576752
13931093602571212
1459329973033736
152571212
1614789067
17baseline6832962
1865632856
19
Sheet1


Thanks for any input.
 
Glad to help & thanks for the feedback.
 
Upvote 0

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Forum statistics

Threads
1,224,823
Messages
6,181,169
Members
453,021
Latest member
Justyna P

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