ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Excel Question (https://www.excelbanter.com/excel-worksheet-functions/214736-excel-question.html)

Cathy

Excel Question
 
I want to past the total results of a filter command to a different column
but the same row. Now I can do it but only if the row are consec.
thank you and have a wonderful day and happy new year

Otto Moehrbach[_2_]

Excel Question
 
Cathy
You will need VBA for that. This little macro will do that. As
written, it is assumed that your data is already filtered. I also assumed
your data is in Column A and you want the data copied to Column E. (the 5th
column). HTH Otto
Sub CopyFilter()
Dim rColA As Range
Dim i As Range
Set rColA = Range("A1", Range("A" & Rows.Count).End(xlUp))
For Each i In rColA.SpecialCells(xlCellTypeVisible)
i.Copy Cells(i.Row, 5)
Next i
End Sub

"Cathy" wrote in message
...
I want to past the total results of a filter command to a different column
but the same row. Now I can do it but only if the row are consec.
thank you and have a wonderful day and happy new year





All times are GMT +1. The time now is 03:57 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com