Hi..
I need to get a VBA code to copy data from merged cell to individual cells. Please see the excel sheet format below:
Copy of Book1.jpg
Thanks in advance -- Jamshad
Hi..
I need to get a VBA code to copy data from merged cell to individual cells. Please see the excel sheet format below:
Copy of Book1.jpg
Thanks in advance -- Jamshad
Option Explicit Sub test() Dim c As Range Dim f As Range Dim s As String For Each c In Range("d3", Range("d" & Rows.Count).End(xlUp)) Set f = Columns("b").Find(What:=c.Value, LookAt:=xlWhole) If f Is Nothing Then s = "" Else s = f.Offset(, -1).MergeArea(1).Value End If c.Offset(, 1).Value = s Next End Sub
if you don't mind just converting the merged cells to individual cells then select the merged cells and run:Then you can move the columns around.Sub blah() With Selection .MergeCells = False .SpecialCells(xlCellTypeBlanks).FormulaR1C1 = "=R[-1]C" .Value = .Value End With End Sub
p45cal
Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.
Well copy the columns to a fresh sheet then.
p45cal
Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.
'