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

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
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,224,845
Messages
6,181,300
Members
453,031
Latest member
Chris_1

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