Note that there are some explanatory texts on larger screens.

plurals
  1. POCopying and Pasting Row and Column Depending on cell value
    primarykey
    data
    text
    <p>Hello i need some help with a abit of code, basically i have a workbook which has a lot of data for product Accessories listed in rows in the columns next to these there are the products with blank fields in all of the cells, basically the point of this is when the user types an "x" in any of these cells the table is able to be filtered.</p> <p>I have made a summary sheet where i want it to look at these specific columns for example columns E-N and if it contains an "x" it will copy the corresponding row which are A,B,C,D and paste it on this summary sheet one after another as well as copying the product from the row above all the x's</p> <p>e.g</p> <pre><code>Column E has an x in E4,5,10,15,53 </code></pre> <p>i want it to copy</p> <pre><code>ABCD4 ABCD5 ABCD10 ABCD15 ABCD53 </code></pre> <p>as well as the product name e.g "melons" which is located just above the first blank box of each column in this case lets say E4 is the first blank so E3 would be the product name. </p> <p>and paste it in a sheet called "Summary Sheet" one row after another.</p> <h2>I know this is really confusing but i hope you can help :)</h2> <p>code i have: I now have this code and im almost at where i want to be i need help on the line</p> <pre><code> Range("A5").Select </code></pre> <p>It gives me an error but unless i select this cell it pastes randomly on the sheet</p> <pre><code> Private Sub CommandButton9_Click() Range("A7:D7").Select Range(Selection, Selection.End(xlDown)).Select ' Go to last line ' Add a filter behavior Selection.AutoFilter Field:=5, Criteria1:="&lt;&gt;" Range("A7:D7").Select Range(Selection, Selection.End(xlDown)).Select Selection.Copy ' Paste data where you want Sheets ("Summary Sheet") Range("A5").Select ActiveSheet.Paste End Sub </code></pre>
    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.
 

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