Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel Challenge: Copy and pasting sheet1 to sheet2 | Excel Worksheet Functions | |||
Automating copy/paste/paste special when row references change | Excel Programming | |||
Challenge: Copy across surname | Excel Worksheet Functions | |||
Excel cut/Paste Problem: Year changes after data is copy and paste | Excel Discussion (Misc queries) | |||
Help: Reformatting worksheet: paste special challenge | Excel Discussion (Misc queries) |