• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

copy and paste the data

shinchan

New Member
If column E of target1.xlsx matches with column A of target2.xlsx then copy column Y of target1.xlsx and paste it to target2.xlsx from column C(if column C has data then paste the data in column D and if column D also has data then in column E and so on....)
vba will be placed in a seperate file
 
shinchan
Here is Your a seperate file.
Open it - press [ Do It ]
ps. those target-files should be in same folder than a separate file.
 

Attachments

  • T1toT2.xlsb
    35.9 KB · Views: 4
First of all thnx vltem sir
But we have to paste the data from column C (if column C has data then look for column D if it has data then look column E and if it doesnt have data then paste the data in column D and so on ..... in this type we have to paste the data)
So plz relook sir and do needful
i dont need that done msg after the operation is done and i dont need the button only i need the code i will go to macros option and i will run the code and the operation done (i dont want done msg after the process is completed )
 
shinchan
Did someone write:
If column E of target1.xlsx matches with column A of target2.xlsx then copy column Y of target1.xlsx and paste it to target2.xlsx...
Do needful and ask who has changed ... Your needful?
I took that button away!
 

Attachments

  • T1toT2.xlsb
    34.3 KB · Views: 4
Sorry Sir for my mistake
i wanted to say that i have copied the vba code from the button but after runing the code it is showing done so thays y i told u that msg box is not required Sir
And thnx Sir for showing my mistake - My question is If cells in column E of target1.xlsx matches with cells in column A of target2.xlsx then copy cells of column Y of target1.xlsx and paste it to target2.xlsx from column C cells (if column C cells has data then paste the data in column D cells and if column D cells also has data then in column E cells and so on....)

Plz have a relook sir
 
hmm?
There were no vba code in the button!
There is no anymore the button!
You won't get anymore 'Done'-message after that code has finished.
That code copies target1.xlsx's Y-column to the first empty column of target2.xlsx-file; if matching as someone has written!
Hmm? What is missing?
 
sir it is pasting the data incorrectly (if column C cells has data then paste the data in column D cells and if column D cells also has data then in column E cells and so on....) in this way it should paste the code sir so plz help Sir
 
shinchan
There were also other possible mystery, which You don't want to have.
I don't try to open it for You.
You can reread Your thread and find out 'what have You written?'.
Maybe this version is something which You meant ... or the result of it.
 

Attachments

  • T1toT2.xlsb
    38.7 KB · Views: 10
i understood sir plz have a look into this sample file i have putted the result in this sample file so that u can understand what i wanted to say
I have highlighted the pasted data for understanding purpose(dont highlight the colour it is only for ur understanding purpose i have highlighted)
 

Attachments

  • target2.xlsx
    8.2 KB · Views: 1
  • target1.xlsx
    9.6 KB · Views: 0
Back
Top