How do I sort with merged cells?

slam

Well-known Member
Joined
Sep 16, 2002
Messages
921
Office Version
  1. 365
  2. 2019
I have data in A1 through V17.

Row 1 is my header row.

A2:A3 are merged, A4:A5 are merged, and that trend continues up to and including A16:A17

Similarly:
V2:V3 are merged, V4:V5 are merged, and that trend continues up to and including V16:V17

I need to do a descending value sort on column V, but I always want row 2 and 3 to stay together, 4 and 5 and so on up to and including row 16 and 17.

How do I go about sorting this? Any help would be greatly appreciated. Thank you.
 
I think I’m going to make things ultra complicated here. So as discussed, I have two drivers per team. The team name in column A is merged over two rows, then column B lists the two drivers in separate rows. There are now 12 teams, so the team names span rows 2 through 25. Columns C through U list the drivers points for each race (race names listed as a header in row 1), then column V lists the team points by adding the points of each driver for each race.

My new scenario is there may be more than 2 drivers per team. A driver drops out, another one fills in. How often could this happen? Well I would hope no more than 2 or 3 times, but I’m not even sure I’d feel completely safe saying 5. I’d feel safe saying a maximum of 10 times.

How would I want this displayed? Well, same setup. Team name (column A) and team points (column V) would be merged over up to 10 rows, then individual drivers and points per race would be on separate rows in columns C through U.

The tricky part of course is I need this to be dynamic based on the drivers entered on the Drivers & Standings worksheet. I currently have the possibility of drivers being entered in B3 through B37 and their associated team name is in D3 through D37.
 
Upvote 0

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
I think I’m going to make things ultra complicated here. So as discussed, I have two drivers per team. The team name in column A is merged over two rows, then column B lists the two drivers in separate rows. There are now 12 teams, so the team names span rows 2 through 25. Columns C through U list the drivers points for each race (race names listed as a header in row 1), then column V lists the team points by adding the points of each driver for each race.

My new scenario is there may be more than 2 drivers per team. A driver drops out, another one fills in. How often could this happen? Well I would hope no more than 2 or 3 times, but I’m not even sure I’d feel completely safe saying 5. I’d feel safe saying a maximum of 10 times.

How would I want this displayed? Well, same setup. Team name (column A) and team points (column V) would be merged over up to 10 rows, then individual drivers and points per race would be on separate rows in columns C through U.

The tricky part of course is I need this to be dynamic based on the drivers entered on the Drivers & Standings worksheet. I currently have the possibility of drivers being entered in B3 through B37 and their associated team name is in D3 through D37.

Additionally, it would be great if it could pull the team names instead of me entering them manually on the Team Standings worksheet. While this is a one time thing, if it were dynamic, it could only list the team if it appeared on the Drivers & Standings worksheet - there may be teams that don't get used.
 
Upvote 0

Forum statistics

Threads
1,225,156
Messages
6,183,226
Members
453,152
Latest member
ChrisMd

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