PDA

View Full Version : copy/paste values only between 2 tabs



Beatrix
02-22-2016, 08:51 AM
Hi Everyone

I need to copy/paste values from one tab to another tab based on the number in row 1. The values in Sheet1 are based on a formula but need to be copied into the same column with same assigned number in row1 in Sheet2. However I don't want to copy it with formula, values only.

There would be more than 1000 records so that's why I need to do it with vba. I would really appreciate it if anyone can help me with this please? I attached a sample file.

Thanks very much.
B.

shailendranr
02-22-2016, 09:01 AM
You want to copy and paste the data only without formula right... the use

sheet2.select
range("a1").pastspecial xlvalues
application.cutcopymode=false


if this is not a answer to your question, give me some more clarity bro

SamT
02-22-2016, 09:41 AM
Your sample file has two identical sheets in it. Shailendranr's suggestion is perfect for that.

Beatrix
02-22-2016, 10:07 AM
Hi shailendranr,

Thanks for your reply. The data could be in any columns on the table in Sheet1. There will be only one column with the data. In attachment it is in column G. In a specific range if there is a column with data then copy paste special values only into Sheet2 based on the row1 number. For instance in attached spreadsheet column G is assigned for number 2 so the data should go to column G in Sheet2 too if number in G1=2.

Cheers
B.