1

I have Sheet A with 500 line items.

Suppose I have applied filter to show line items "2","44","68" and so on

From Another Sheet i want to select some rows and paste them in these filtered rows.If I paste,they get copied on line items 2,3,4,5, and so one instead of 2,44,68,etc

Can Someone please help me.I tried paste special,but it has same issue.

I also tried selecting the area to paste,then clicking alt + ; but the data also gets copied into unfiltered items.

Rahul Shah
  • 1,387
  • 4
  • 22
  • 41

3 Answers3

3

This is more of an approach solution then a coding solution. I assume that the current order of the rows must be maintained.

  1. Add a column to to your sheet, use autocomplete to number the current order of the rows.
  2. Sort by your filter value(s) - if you have multiple values, just add another column and put a single unique value in it
  3. Paste your values
  4. Sort by you current order column, to restore the orginal order

enter image description here

James Jenkins
  • 1,954
  • 1
  • 24
  • 43
2

If it is with same sheet you can make the two columns adjacent by hiding other columns in between. You can block the data and drag it to next column.

For eg.

  1. I have column A, B, C, D.
  2. Let A be ZIP CODE & Column D is 'Shipping Service'
  3. I need to have ZIP CODE(Column A) with '95035' to have Shipping Service as 'Fedex'
  4. Filter the column A with '95035'
  5. Hide the column B & C
  6. Drag the values from A to D directly where the values are copied to the adjacent cells.

Note: If you use two separate sheets copy the columns entirely to the sheet 1 adjacent to the column you want to copy and again take copy the entire column back to Sheet 2. This will work if both sheet have same number of rows.

Thanks, Karthik

0

The easiest coding solution is to use vlookup http://office.microsoft.com/en-us/excel-help/vlookup-HP005209335.aspx

On sheet1 from Sheet2 use

=VLOOKUP(B3,Sheet2!A:B,2,FALSE)

enter image description here

James Jenkins
  • 1,954
  • 1
  • 24
  • 43
  • i dont want to add something in a new column next to filtered rows i want to replace the filtered rows with new content. – Rahul Shah Apr 26 '13 at 17:30
  • Why don't you just delete the rows, after you filter? Then they will be gone and you can add new stuff at the bottom. – James Jenkins Apr 26 '13 at 17:37