Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy only where data ends in column
Is it possible to copy a range to where the data ends in a column.
For example the range: Range("D8:J900").Select Selection.Copy If the data ends in D822 then can only data in the range: Range("D8:J822").Select Selection.Copy be copied and at the same time ignore the formulas contained in each and all of the cells within the range? Is this possible? Much appreciate if someone could let me know. Pat |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy only where data ends in column
I hope I understood your question correctly. You want to copy all of the
non-formula itmes in range D8 through J900. You also wanted to select only up to the last row. Since anything after the last row is not a formula you can ignore this. Here is my implimentation of your code. To get this in a macro Select the range - Hit F5 - Choose Special - choose constants - Choose OK Sheets("Sheet1").Range("D8:J900").SpecialCells(xlC ellTypeConstants).Copy HTH "Pat" wrote: Is it possible to copy a range to where the data ends in a column. For example the range: Range("D8:J900").Select Selection.Copy If the data ends in D822 then can only data in the range: Range("D8:J822").Select Selection.Copy be copied and at the same time ignore the formulas contained in each and all of the cells within the range? Is this possible? Much appreciate if someone could let me know. Pat |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy only where data ends in column
Thank you for replying. The solution I am looking for is different to your
suggestion. I want to be able to copy a range where the range can automatically alter to only copy where data ends in column "D" If the data in column "D" happens to end in D822 then only copy to D822. So rather than copy D8:J900 and do what you suggest: Select the range - Hit F5 - Choose Special - choose constants - Choose OK I would only want to copy D8:J822 Pat "Jim Thomlinson" wrote in message ... I hope I understood your question correctly. You want to copy all of the non-formula itmes in range D8 through J900. You also wanted to select only up to the last row. Since anything after the last row is not a formula you can ignore this. Here is my implimentation of your code. To get this in a macro Select the range - Hit F5 - Choose Special - choose constants - Choose OK Sheets("Sheet1").Range("D8:J900").SpecialCells(xlC ellTypeConstants).Copy HTH "Pat" wrote: Is it possible to copy a range to where the data ends in a column. For example the range: Range("D8:J900").Select Selection.Copy If the data ends in D822 then can only data in the range: Range("D8:J822").Select Selection.Copy be copied and at the same time ignore the formulas contained in each and all of the cells within the range? Is this possible? Much appreciate if someone could let me know. Pat |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2003 data import wizard does not support line ends in fields | Excel Discussion (Misc queries) | |||
setting worksheet so it ends at last data entry in column | New Users to Excel | |||
Area chart display ENDS before data ? | Charts and Charting in Excel | |||
filter using "ends with" and 3 choices? Ex: ends with 1,2 or3 | Excel Worksheet Functions | |||
Data string ends up in first cell instead of Comma sepaerated CSV format | Excel Programming |