Melt summarised data using Calc

I have summarized input data that I would like to expland into a desired output format as shown below. I essentially want to work backwards and ‘melt’ the summaries. I’ve been poking around Calc for the last couple of hours and cannot seem to figure out how. Any thoughts?

Input data

Column1       Column2      Count 
X             A            2  
X             B            3  
Y             A            4  
Y             B            1   
Z             B            2  

Desired output

Column1  Column2  
X        A  
X        A  
X        B  
X        B  
X        B  
Y        A  
Y        A  
Y        A  
Y        A  
Y        B  
Z        B  
Z        B  

Update #1: Changed input and output headers
Update #2: set ExampleData as Code Karolus

Sorry, but at least I would need a bit more information on what the strings under Input Data and Desired Output mean.

The strings are merely arbitrary row entries. I’ve just renamed the column headers–I’m hoping that will clear things up a little.