ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   copy and paste challenge (https://www.excelbanter.com/excel-programming/415229-copy-paste-challenge.html)

Terry Freedman

copy and paste challenge
 
Hi

I'd be grateful for any help on trying to do the following, please.
I've had a go at it myself, but am sort of getting lost. I've looked
in previous posts, and can't find one that addresses this exact
problem, and have found it hard putting together a macro from
different "bits". Basically, I need to be
able to do this:

1. Select from a range of criteria (eg cells in column D on Sheet1 are
not blank)
2. From the data that meets that criterion, copy/paste the cells from
particular columns from Sheet1 to the next blank worksheet
3. go back to step 1, but select a different criterion

If this is possible, I'd be grateful for some help.

Thanks very much, and apologies for cross-posting

Terry

Skinman

copy and paste challenge
 
Not sure of an elegant way but if you set up column D with auto filter
turned on in a header
for your data, name the range with the data, use the filter to get the data
you want
Then a macro to do the rest:-
On the sheet you are moving data to, select the cell in the first instance
where you want
the data to start. I set it so each time you run the macro it will paste to
the column
on the right of the last paste. If you want it below each time change the
offset with End (xlDown)
I named the range "send" Also replace sheets with what your sheets are named

Sub Transfer_Data()
Application.ScreenUpdating = False
Application.Goto Reference:="send"
Selection.SpecialCells(xlCellTypeVisible).Select
Selection.Copy
Sheets("Sheet2").Select
ActiveCell.Select
ActiveSheet.Paste
ActiveCell.Offset(0, 1).Range("A1").Select
Sheets("Sheet1").Select
Application.CutCopyMode = False
Application.ScreenUpdating = False
End Sub
As I saw no expert help I thought I would try to help, Please excuse this
amatuer attempt
Skinman

"Terry Freedman" wrote in message
...
Hi

I'd be grateful for any help on trying to do the following, please.
I've had a go at it myself, but am sort of getting lost. I've looked
in previous posts, and can't find one that addresses this exact
problem, and have found it hard putting together a macro from
different "bits". Basically, I need to be
able to do this:

1. Select from a range of criteria (eg cells in column D on Sheet1 are
not blank)
2. From the data that meets that criterion, copy/paste the cells from
particular columns from Sheet1 to the next blank worksheet
3. go back to step 1, but select a different criterion

If this is possible, I'd be grateful for some help.

Thanks very much, and apologies for cross-posting

Terry




All times are GMT +1. The time now is 10:00 PM.

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