Note that there are some explanatory texts on larger screens.

plurals
  1. POExcel 2010 : Copy block of cells from sheet 2 > sheet1 based on criteria
    primarykey
    data
    text
    <p>Good morning...</p> <p>I'm trying to perform the following in excel 2010:</p> <p>Search Sheet1, col A for the 'test a' or 'test b' etc. If say 'test a' is found, then search Sheet 2, col A for all occurrences of 'test a' and copy sheet 2 col B->P for each row into Sheet 1 Col B starting from where the initial 'test a' found in sheet 1, incrementing downwards for each row found in sheet 2.</p> <p>Sheet 1 :</p> <p>col A :</p> <ul> <li>test a</li> <li>xxxxxx</li> <li>xxxxx</li> <li><p>xxxx</p></li> <li><p>test b</p></li> <li>xxxxxx</li> <li>xxxxx</li> <li><p>xxxx</p></li> <li><p>test c</p></li> <li>xxxxxx</li> <li>xxxxx</li> <li>xxxx</li> </ul> <p>Sheet 2 :</p> <p>Col A, B, C, D, -> Col P</p> <ul> <li>test a , 1, 2, 3, 4 ....</li> <li>test a , 5, 6, 7, 8 ....</li> <li>test a , a, b, c, d ....</li> <li><p>test a , e, f, g, h ....</p></li> <li><p>test b , 1, 2, 3, 4 ....</p></li> <li>test b , 5, 6, 7, 8 ....</li> <li>test b , a, b, c, d ....</li> <li>test b , e, f, g, h ....</li> </ul> <p>etc</p> <p>Desired Result :</p> <ul> <li>test a , 1, 2, 3, 4 ...</li> <li>xxxxxx , 5, 6, 7, 8 ....</li> <li>xxxxx , a, b, c, d ....</li> <li>xxxx , e, f, g, h ....</li> </ul> <p>Having never done any excel/vb coding I'm struggling to even get started!.</p> <p>The best I can do is a high level code:</p> <pre><code>For search criteria 'test a|test b ..' if sheet 1, col A equal to 'criteria' (save row where found) if sheet2, col A equal to 'criteria' copy sheet2, col b-&gt;col p, row (where 'criteria' found) &gt; sheet1, Col B, row (where criteria found in sheet1), incrementing row downwards as we go. </code></pre> <p>Very much appreciate some guidance on how to accomplish this!</p> <p>Many thanks</p>
    singulars
    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.
 

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