Note that there are some explanatory texts on larger screens.

plurals
  1. POMacro to copy rows from multiple workbook to summary workbook with matching column value
    primarykey
    data
    text
    <p>I have different workbooks with different sheets with same Sheet name.(Book1,Book2,Book3,excel1,excel2,micorsoft etc) in a folder.</p> <p>I would like to create way to have the entire row (when data is entered) transfered to a summary workbook with the matching value in a cell.please see the example table below.</p> <p>If you notice the example below,I have a Book1 with worksheet1 (it also have different worksheets along with this one). </p> <p>Now my requirement is to copy entire row with matching status column cell or cells (eg: NEW,research) into the workbook where macro is running,from all the workbooks in a folder.</p> <p>I request if some one can help me with this macro that will be great.</p> <p>Note:</p> <p>Not always but Some times this data would change from time to time, so it would have to keep over-writing with the most up to date data. I would just like it all to consolidate onto 1 workbook so I can have the data from there. Is this something that can be done easily? I've tried my luck at some macros but I can't seem to get it.</p> <p>Book1</p> <p>Worrksheet1</p> <pre><code>column A column B column C status comment column D Update New Modified New New Research Research </code></pre> <p>I was lucky enough to get a code to copy from one sheet to other in a single book the code is below</p> <p>Code:</p> <pre><code>Sub Foo() Dim i As Long, iMatches As Long Dim aTokens() As String: aTokens = Split("New,research", ",") For Each cell In Sheets("Worrksheet1").Range("E:E") If (Len(cell.Value) = 0) Then Exit For For i = 0 To UBound(aTokens) If InStr(1, cell.Value, aTokens(i), vbTextCompare) Then iMatches = (iMatches + 1) Sheets("Worrksheet1").Rows(cell.Row).Copy Sheets("final").Rows(iMatches) End If Next Next End Sub </code></pre> <p>Description:</p> <p>This code will copy ALL rows content with the words matching NEW,research or any required in the column E : E from Worrksheet1 sheet to final sheet</p> <p>Now change required in this is to copy from different workbooks in a folder(given path to directory) into single workbook in same or differ folder.</p> <p>If i can have an option to email the copy like mentioned below link will be great <a href="https://stackoverflow.com/questions/11290999/creating-a-windows-application-which-reads-and-writes-excel-spreadsheets-reads/11317934#11317934">Creating a Windows application which reads and writes excel spreadsheets + reads and writes emails</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload