Note that there are some explanatory texts on larger screens.

plurals
  1. POAltering a macro to insert info instead of just copying
    text
    copied!<pre><code>Sub test4() Dim LCopyToRow As Long Dim LCopyToCol As Long Dim arrColsToCopy Dim c As Range, x As Integer On Error GoTo Err_Execute arrColsToCopy = Array(1, 25, 3) 'which columns to copy ? Set c = Sheets("MasterList").Range("Y5") 'Start search in Row 5 LCopyToRow = 2 'Start copying data to row 2 in Sheet4 While Len(c.Value) &gt; 0 'If value in column Y ends with "2188", copy to Sheet4 If c.Value Like "*2188" Then LCopyToCol = 1 For x = LBound(arrColsToCopy) To UBound(arrColsToCopy) Sheets("Sheet4").Cells(LCopyToRow, LCopyToCol).Value = _ c.EntireRow.Cells(arrColsToCopy(x)).Value LCopyToCol = LCopyToCol + 1 Next x LCopyToRow = LCopyToRow + 1 'next row End If Set c = c.Offset(1, 0) Wend 'Position on cell A5 Range("A5").Select MsgBox "All matching data has been copied." Exit Sub Err_Execute: MsgBox "An error occurred." End Sub </code></pre> <p>This is what I'm using now to pull columns and paste them in the appropriat eorder. I would like two things to happen. First, this macro simply pastes the information; I would like to insert the rows of information since i have formulas at the end of columns is the destination sheets. With just pasting, the info will paste over cells that have formulas in them. Second, the macro above doesn't carry over any borders; I have the destination sheet set up but when it pastes it loses all the borders(even though the MasterSheet and the destination sheets are bordered). Maybe inserting will fix that - I'm not sure. But at any rate I would like to insert instead of paste.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload