Copy/Pasting Concatenated Value

keeper10

New Member
Joined
Jul 28, 2014
Messages
13
Hi all,

Ok, so I have two worksheets(index and master). When the user inputs data, the program creates a unique PR number automatically that has 3 letters, then 5 numbers. (eg. STL39849). I did this by concactenating two other cells. I want to copy and paste this PR number so I can paste it in another area, but a simple copy and pastespecial does not work for the result of a concatenated value. Just to reiterate, the PR number is a value created by concatenating two cells. I want to take this value and paste it in another location. Any help is appreciated!
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
I recieve an error message that says the copy/paste area isn't the same. I am unsure why I am receiving this though.
 
Upvote 0
Like Chris said above, I have VBA that throws this error when I have merged cells, I added extra lines to unmerge and remerge afterwards... I also have another report that copies/pastes values just in the same place to save the worksheet from having a million formulas constantly calculating. That report will throw that copy/paste area error if I have accidentally left the worksheet filtered...
 
Upvote 0
I fixed that error, however, when it pastes the concatenated cell, it will only paste the number. For example, it should copy "STL99999" and paste it. Instead it just pastes "99999". This is the problem I have been running into. I can't get it to paste the entire thing instead of just the numbers.
 
Upvote 0
I figured the error (if that's what you would call it). I was using .PasteSpecial xlPasteValues. Instead of using this function I used the .Insert function. It will allow you to take the entire value, letters and numbers, and put it where you need it to go.
 
Upvote 0

Forum statistics

Threads
1,215,200
Messages
6,123,612
Members
449,109
Latest member
Sebas8956

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