It's not a macro, but I think this will do what you are asking for.
I started with the last image you posted, which assumes that all of the original source data has been merged into a single spreadsheet, that the original data is in chronological order, and that the monthly data is all at the top of the sheet while the quarterly data is all at the bottom:
(The colors are just there so we can keep track of which data is which moving forward.)
Now, I added a column to the left, and just auto-filled numbers from 1 to n into it as an index. These will be used later, to keep track of which data is monthly and which is quarterly (the monthly data will always have a lower index value than the quarterly data):
Next, I highlighted all the data (including the index) and did a Sort. I specified to sort by column B first (the date) and then by column A (the index):
The result was what you see below, where the data is all merged together, but wherever you have data for both a month and a quarter, the month is always on top because of the index.
Now, I add some more columns on the right. These columns all have formulas in them, I made it so you can see the formula in cell D2:
The formula for D2 is =IF((B2=B3),B2,"")
, the formula for E2 is =IF((B2=B3),C2,"")
and the formula for F2 is =IF((B2=B3),C3,"")
. I created these just for Row 2, and then dragged then down to auto-fill the other rows. You can see in the image above the result. Whenever you have two sequential rows that contain the same date value, cells D, E and F for the first of the two rows populate themselves with the date and the two data values. The way the formulas work, you don't get duplicates.
Finally, to make it pretty, I selected all of the cells in the range of D2 to F11, copied them and then did a "Paste Values Only" into the next set of columns over. What this does is to paste the values you see on the screen instead of the formulas behind them. (You'll have to set the cell format in the newly-created date row column to date, as Excel will initially paste the date values as raw numerical data).
Once that's done, I just highlighted cells H2 to J11 and did another sort on column H:
The spreadsheet is attached.