• 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.

Dynamic copy-pasting

Narnia_28

New Member
Hi All,

I need your help to develop a macro for the below problem statement.

In attached excel, sheet 1 is my input. So I have to take data from sheet one and filtered it out in sheet 2. Then copy the filtered result and paste it in new workbook/sheet. Take the 2nd input and do all the filtering and paste it in the next blank row of previously created workbook/sheet. I tried so many ways to achieve it but failed to do so. So far I have completed it till filtering using loops and all and paste data for first input only. Any help is very much appreciated.

Thank You.
 
Narnia_28
Without Your file ... You can only wait.
I tried attaching it many a times, but I don't know what is the issue with that. I am adding snips instead of excel file.

This is my input sheet.

71348


This is sheet 2, where I have to filter out the data. Can you advise using this one please.

71349
 
Hi,

Input sheet 1 is the input. Other sheet is for the filtering purpose. Can you please advise something.
 

Attachments

  • Input sheet 1.xlsx
    8.1 KB · Views: 2
  • New Microsoft Excel Worksheet.xlsx
    9.6 KB · Views: 3
Narnia_28
You have there two columns ... which do not have any common data.

If You 'use' From Input sheet 1.xlsx - 12380 ...
What would You do next?
 
I would take 12380 first and search for it in other sheet and copy the filtered result in another sheet. Then take next value from sheet 1 and filter. So far I have just copied data for 12380 in sheet but unable to do it for others using single expression or code.
 
Adding one more file for reference as you would not find 12380 in the previously shared sheet.
 

Attachments

  • New Microsoft Excel Worksheet.xlsx
    9.6 KB · Views: 4
Narnia_28
...hmm?
... Sheet2 do not have any Sheet1 values!
What/ how would You Search?
... next You wrote that You'll copy ... what would You copy? ... nothing? where to copy previous (nothing)?

Yes - next step is okay - You'll take next value from Sheet1, but ...
after that - there is same challenge! ... as written above ...hmm?

Something ... not match?
 
There's no exact value as sheet 1, but when I filter 12380 in sheet 2 it gives result as 12380_1, 12380_BA70 like that, so I want to copy that filtered data in other sheet.
 
Narnia_28
Please, if You write something and You'll mean something else ...
Question:
How somebody else than You, could ... guess that You meant something else .. not ... something that You have written?
... especially ... it something would do ... hmm? ... dynamic?
Your original files do not have ... anything to copy ...
Please, try to sit and think few more seconds and after that - write - reread Your text ...
 
Back
Top