Sorting by 3 colors

bryleek

New Member
Joined
Feb 8, 2023
Messages
6
Office Version
  1. 2021
Platform
  1. MacOS
I want to sort by the 3 different time points. Ideally, the column would repeat baseline (green) 1 year (blue) 2 year (yellow) all the way down.
 

Attachments

  • Screenshot 2023-02-08 at 1.21.42 PM.png
    Screenshot 2023-02-08 at 1.21.42 PM.png
    155.9 KB · Views: 9

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Welcome to the Board!

Since each color seems to be aligned with a specific text value (the "eventname"), why not just sort by the "eventname"?
 
Upvote 0
Welcome to the Board!

Since each color seems to be aligned with a specific text value (the "eventname"), why not just sort by the "eventname"?
Hi! When I sort by "eventname" it puts 1 year together, baseline together, and 2 year together. Rather I want the order to repeat as each subject has three different time points and I want the subjects to stay together.
 
Upvote 0
Hi! When I sort by "eventname" it puts 1 year together, baseline together, and 2 year together. Rather I want the order to repeat as each subject has three different time points and I want the subjects to stay together.
I am not following what you want, as it relates to the rest of your data.
Please show us a "before" picture (what you have to start with) and an "after" picture (what you want it to look like when it is done).
That might help clarify exactly what you are trying to do.
 
Upvote 0
I am not following what you want, as it relates to the rest of your data.
Please show us a "before" picture (what you have to start with) and an "after" picture (what you want it to look like when it is done).
That might help clarify exactly what you are trying to do.
Of course! You'll notice rows 2-4 consist of the same subject ID (same participant) and their 3 timepoints are in the correct order (baseline, 1 year, 2 year). This is what I need! Some subjects are missing time points and only have 1 or 2 (which makes this even more difficult) and others have all 3 (ideal). I am needing the subject ID ordered in the correct time points they were seen (baseline, 1 year, 2 year). Right now I have the subjects ordered correctly but their time points are not. I can get rid of the color coding if there is another way to organize this.
 

Attachments

  • Screenshot 2023-02-08 at 3.00.17 PM.png
    Screenshot 2023-02-08 at 3.00.17 PM.png
    134.9 KB · Views: 4
Upvote 0
You should be able to do this with a Custom Sort.
Follow the instructions here: Sort data using a custom list - Microsoft Support

Your first sort field will be column A.
Your second sort field will be column B, and you set a Custom Sort order of "baseline, 1 year, 2 year"
 
Upvote 1
Solution
You are welcome!
Glad I was able to help.
 
Upvote 0

Forum statistics

Threads
1,215,065
Messages
6,122,945
Members
449,095
Latest member
nmaske

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