How to combine ranges and sort chronologically with a single formula?

alexcr

Board Regular
Joined
Oct 15, 2018
Messages
59
Office Version
  1. 365
Platform
  1. Windows
Let's say you have the following...

• In A1:J1, a range of dates; in B2:J2, a range of values corresponding to those dates.
• In A4:D4, a range of dates; in A5:D5, a range of values corresponding to those dates.
• In A7:Y7, a range of dates; in A8:Y8, a range of values corresponding to those dates.

You want to combine all the aforementioned dates in Row 10, starting in A10, without skipping over any duplicate dates. And you want the corresponding values for those dates to be in Row 11, starting in A11. Finally, you want this data to be sorted chronologically, from earlier date to latest date.

Is there a formula that you can enter in A10 and A11 that would accomplish this?

(Note that the data in Rows 1-2, Rows 4-5, and Rows 7-8 is regularly changing, with date/value columns being added and removed, so this formula would ideally accommodate for such changes without needing to be updated.)

Thanks in advance!
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
How about
+Fluff 1.xlsm
ABCDEFGHIJKLMNOPQR
122/10/202120/03/202114/06/202111/06/202122/08/2021
26489769956
3
411/06/202125/09/202116/04/202118/11/202101/06/202101/12/2021
58959395450
6
720/08/202103/04/202116/02/202121/04/202103/02/202123/09/202120/08/2021
830632679907079
9
1003/02/202116/02/202120/03/202103/04/202116/04/202121/04/202101/06/202111/06/202111/06/202114/06/202120/08/202120/08/202122/08/202123/09/202125/09/202122/10/202118/11/202101/12/2021
119026896397954998763079567095643950
Main
Cell Formulas
RangeFormula
A10:R11A10=SORT(CHOOSE({1;2},TRANSPOSE(FILTERXML("<k><m>"&TEXTJOIN("</m><m>",,A1:Z1,A4:Z4,A7:Z7)&"</m></k>","//m")),TRANSPOSE(FILTERXML("<k><m>"&TEXTJOIN("</m><m>",,A2:Z2,A5:Z5,A8:Z8)&"</m></k>","//m"))),,1,1)
Dynamic array formulas.
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,391
Messages
6,119,239
Members
448,879
Latest member
VanGirl

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