Copying a whole row, only paste certain values

nyconfidential

New Member
Joined
Jul 22, 2015
Messages
49
Office Version
  1. 365
  2. 2016
Hi all - I have a user who pastes an entire row of values from a csv into an xlsx file. This was fine initially, but there are now a few columns we DON'T want to paste data into (ex - we copy a row from the CSV that does from column A to Z, we want to paste the data into every column in the xlsx except for column, D, E and F).

I guess my question is - Is there a way to specify which columns to paste after the entire range has been copied to the clipboard? Example - paste columns A-C, don't paste D-F, paste E-Z. I know could use that "Union" function when copying but I'd rather not have to convert the csv into an xlsx -trying to keep this as simple as possible for the user. Thanks in advance...
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Is there a way to specify which columns to paste after the entire range has been copied to the clipboard?
As far as I know, this possibility does not exist. In this case I would use a temporary worksheet. Copy the original and (except for a few columns) to be replaced row in its entirety to this temporary worksheet. Paste the CSV data in there and then copy the cells of those few columns from the original row to the new row on the temporary worksheet. Finally, copy that row (back) to the original row on the original worksheet. This is one of the possible ways to go about this, but I am afraid you will have to write some necessary code to force the user in such a way that no data is lost.
 
Upvote 0
Hi all - I have a user who pastes an entire row of values from a csv into an xlsx file. This was fine initially, but there are now a few columns we DON'T want to paste data into (ex - we copy a row from the CSV that does from column A to Z, we want to paste the data into every column in the xlsx except for column, D, E and F).

I guess my question is - Is there a way to specify which columns to paste after the entire range has been copied to the clipboard? Example - paste columns A-C, don't paste D-F, paste E-Z. I know could use that "Union" function when copying but I'd rather not have to convert the csv into an xlsx -trying to keep this as simple as possible for the user. Thanks in advance...
are you copying all rows or only selected rows?
There is a way to copy only certain columns, but it will copy all the rows in the sheet. But you can copy the selected data to a sheet and then copy the select rows.
 
Upvote 0

Forum statistics

Threads
1,213,534
Messages
6,114,188
Members
448,554
Latest member
Gleisner2

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