Can someone try this and let me know if it works for them - Thanks
Posted by Brian P on June 15, 2001 11:54 AM
I posted this earlier but didn't get a response. Can someone try this and let me know if it works for you.
I'm trying to get a data import into a database type format and can't get this piece of the code to work.
On a blank sheet put CCG in cell "e1" and put anything in "f1" and "g1". Then copy e1:g1 to e4, e8 and e12.
Now try the following. Does it work for you?
Thanks
Sub test()
Range("A1:C1").Select
Selection.FormulaArray = _
"=IF(LEFT(RC[4],3)=""CCG"",TRANSPOSE(RC[4]:R[2]C[4]),"""")"
Selection.AutoFill Destination:=Range("A1:C20")
Columns("A:C").Copy
Columns("A:C").PasteSpecial Paste:=xlValues
Columns("G:G").SpecialCells(xlCellTypeBlanks).Select
Selection.EntireRow.Delete
End Sub