Help Pasting into a table

reeliq

New Member
Joined
Jul 22, 2011
Messages
6
Can someone help me paste my information into a table.

I'm copying information from one spreadsheet and adding it to another.

I am adding a new line to the bottom of the table and want the information to be copied there, but I keep getting an error.

Here is the code I have so far

If (ActiveCell = "John Smith") Or (ActiveCell = "James Jones") Then
Range(Cells(AC, 1), Cells(AC, 3)).Copy
Workbooks("Quality Tracker").Activate
Sheets("Eric's Team").Select
If (ActiveCell = "") Then
ActiveCell.Select
Else: Cells(1, 1).Select
Selection.End(xlDown).Select
Last = ActiveCell.Row
Rows(Last).Select
Selection.ListObject.ListRows.Add
End If

Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False

End If
Next xReps
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
reeliq,

Try changing this:
Range(Cells(AC, 1), Cells(AC, 3)).Copy


To this:
Range("AC1:AC3").Copy

Or this (AC is column 29):
Range(Cells(1,29), Cells(3,29)).Copy
 
Upvote 0
This still was producing an error.

AC actually is set up as ActiveCell.Row.

What I'm looking to do is loop a list of names in a Range. When I find a specified name to copy certain cells on that row, and copy and paste them to another sheet again by finding that name and pasting them in the same row.

Example:

Sheet 1

Find John Smith: Copy Cells 3-6 of the same row when found.

Paste on Sheet 2 in cells 2-5 in the same row that John Smith is located on Sheet 2.

Not sure if my code is adequately doing this.
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,730
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top