ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copy&Paste variable range based on cell value (https://www.excelbanter.com/excel-programming/394305-copy-paste-variable-range-based-cell-value.html)

Thomas

Copy&Paste variable range based on cell value
 
Hi community,

Worksheet 'Dump' contains data in column A:G, variable number of rows. The
data is sorted by column D descending (values being "c", "b", "a").
I want to copy & paste only the rows with "c"'s and "b"'s
So, I need a macro that
- finds the last row of my needed range (as soon the macro finds an "a" in
cell Dx)
- selects the range (column A,B, row 1 to last needed row) and copies it
to a worksheet "Comments" to cell A1

Thanks a bunch in advance for your help
Thomas


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

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