Get Cell Data From A Worksheet, Place It In A Table

JonesZoid

New Member
Joined
Dec 11, 2013
Messages
27
All

I have a piece of code that creates a new row at the end of a table which i then reference as oNewRow.

I am now trying to get a specific cell from a another worksheet, and place it in a certain cell in the oNewRow.

Here is what i have tried thus far, to no avail

Code:
oNewRow.Range.Cells(1, 5).Value = wsqt.Range(Cells(Selection.Row, 2).Address).Value

wsqt has already been set to the relevant sheet.
When run, the hard coded values show in the table but not the values from another sheet.... CONFUSED....

Craig
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
All

I have found a crude way of acheiving this now.
But if anyone can improve the code that would be much appreciated.

Code:
wsqt.Activate
wsqt.Range(Cells(Selection.Row, 2).Address).Copy
wspl.Activate
oNewRow.Range.Cells(1, 5).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
 
Upvote 0

Forum statistics

Threads
1,223,249
Messages
6,171,031
Members
452,374
Latest member
keccles

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