Paste Special

ashani

Active Member
Joined
Mar 14, 2020
Messages
345
Office Version
  1. 365
Platform
  1. Windows
Hi gurus,

I'm looking to have a VBA syntax for paste special value in the following circumstances :

I would like to copy the last entry from the following columns in sheet 1 to Sheet 2

Sheet 1 : Column K to Sheet 2 B1
Sheet 1 : Column N to Sheet 2 C1
Sheet 1 : Column Q to Sheet 2 D1

Many thanks for your help.
 
Hello Ashani

A couple of our suggested solutions to your question have failed if the last entry in a column happens to equate to "". I couldn't see where you mentioned what your wishes were if such a situation were to happen. What action would you want - perhaps print a zero, or as JLGWhiz is attempting to do, and that is to go back up the column to the previous entry and then transfer it to Sheet #2?

TotallyConfused
 
Upvote 0

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
@JLGWhiz - Yes, you are correct. I changed my test data and my code failed as soon as it encountered a NUL value. The NUL value being unprintable is something I hadn't considered. Thanks for bringing this to my attention.

TotallyConfused
Thought you might want to check it out.
Regards, JLG
 
Upvote 0

Forum statistics

Threads
1,215,020
Messages
6,122,712
Members
449,093
Latest member
Mnur

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