Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88030

Excel - Working with Merged Cells Dynamically

$
0
0

Good afternoon, hope you're all doing well.

Our Data Warehouse is exporting the data in kind of a weird format, using merged cells, which we have to clean weekly so we can work with it.

Sample Data

In the screenshot you can find the setup, which relies on merged cells, instead of copying the partner, dates, brand & zone code.

I've created a formula that specifies that if the row above is blank, then, it finds the next cell further on top which has text and copies it, but it's a little unreliable, it goes like this:

=IF([@Date]="",B23,[@Date])

=IF([@Date]="",B24,[@Date])

Since B23 is not blank, then it assumes its value. Then, the next one, since B24 is blank, then it copies B23. Then, since B25 is blank, it copies B24, which already has the date value.

It works, but it seems like there must be a better way to achieve this dynamically, for the dates and the other merged columns, which have the same pattern with the merged cells. I have explored some Power Query solutions, but yielding no results. Note that when importing this data with Power Query, the merged cells simply come as "null".


Viewing all articles
Browse latest Browse all 88030

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>