On the other hand, you can try that be yourself, read the numbers from the source cells into an array at the correct location, the write it into the destination with the merged cells. Using parameters in API calls from Excel cells (named ranges) We have seen how to create graphs and reports calling the ITM Platform API from Power Query for Excel. Got it? That's the reason why such things are not possible. That means if we want to paste these numbers, we have to decide to put which number in which cell.Īnd where should a code put the numbers from 2 to 100 when all cells from A1:J10 are merged? Click on Insert tab to insert a new module. Step 2: It will open the VB Editor for us. Step 1: Go to developer’s tab and click on Visual Basic to open VB Editor. See the issue? Some of the numbers from 1 to 100 are vanished.Īnd when you unmerge all cells, you got empty cells, not the missing numbers. Follow the below steps to clear the content of the cell using VBA code. Make another new file, merge some cells as you like in A1:J10 and run the macro again. Range("A1").Resize(UBound(Data), UBound(Data, 2)).Value = DataĪs you see, the numbers from 1 to 100 are visible in the sheet. In VBA, we make codes to automate our tasks. For example, cell A1 to cell B3 is a range of cells if they contain a value of some sorts or they are empty. The range is particularly a data set in excel. Make a new file, run this macro: Sub Test() VBA Range Cells In VBA, the range is also called the property of an individual cell or a group of cells in any row or a column. So if Excel would allow you that, the result would be that some of the values vanish! The reason is that merged cells doesn't vanish, they just get hidden.