SOLVED

Automated copy and paste

Copper Contributor

Hi there, I have data from a cell that I need to copy and paste the values to a different cell so that I can turn that cell into a table to extract from. Is there a way to automatically copy and paste without my intervention as I would need the whole system to be automated 

1 Reply
best response confirmed by Jamesupp (Copper Contributor)
Solution

@Jamesupp 

Simplified with formula:

=IF(B2="","",A1)

 

With VBA:

Sub Copy_Paste()
    On Error Resume Next
    Dim xRg As Range
    Set xRg = Application.Selection
    Range("A1:A10 ").Copy Range("D1:D10")
    xRg.Select
End Sub

 

Hope I could help you with these information / links.

 

NikolinoDE

I know I don't know anything (Socrates)

1 best response

Accepted Solutions
best response confirmed by Jamesupp (Copper Contributor)
Solution

@Jamesupp 

Simplified with formula:

=IF(B2="","",A1)

 

With VBA:

Sub Copy_Paste()
    On Error Resume Next
    Dim xRg As Range
    Set xRg = Application.Selection
    Range("A1:A10 ").Copy Range("D1:D10")
    xRg.Select
End Sub

 

Hope I could help you with these information / links.

 

NikolinoDE

I know I don't know anything (Socrates)

View solution in original post