Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I have a few reports appended in one excel sheet. I want to be able to select the specific range of one report and cut so that I can paste into either new sheet or workbook. Example, Column A contains the report name and at end contains the total Line items (Report name) Data Total Line Items (end of report So would like to select this portion. Hope I'm making sense. Please advise any info. Thanks, Juan |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
try something like sub foo() dim lastrow as long Dim firstrow as long Dim rng as range with activesheet lastrow = .Cells(Rows.Count, 1).End(xlUp).Row -1 firstrow = 2 set rng = .range("A" & firstrow & ":A" & lastrow) msgbox rng.address end with end sub -- Regards Frank Kabel Frankfurt, Germany JUAN wrote: Hello, I have a few reports appended in one excel sheet. I want to be able to select the specific range of one report and cut so that I can paste into either new sheet or workbook. Example, Column A contains the report name and at end contains the total Line items (Report name) Data Total Line Items (end of report So would like to select this portion. Hope I'm making sense. Please advise any info. Thanks, Juan |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello Ken,
thanks, but this doesn't do what I want. This code basically just tells me the last row. What I would like to do is to select a range of data to copy to another place. My workbook contains a few reports appended together so need to take each report and move to different place. Each report is separated by the last row which contains the total. So example, First report starts at Line Items (which is the report name data end of report Total Line items Second report Line items per2 Data End of repot Total Line items per 2 ETC, sO need to find a way to select between Report name and end of its total row. Hope I'm making sense. I really appreciate all your help. I'm trying to modify the code but without success. Please advise thanks, juan -----Original Message----- Hi try something like sub foo() dim lastrow as long Dim firstrow as long Dim rng as range with activesheet lastrow = .Cells(Rows.Count, 1).End(xlUp).Row -1 firstrow = 2 set rng = .range("A" & firstrow & ":A" & lastrow) msgbox rng.address end with end sub -- Regards Frank Kabel Frankfurt, Germany JUAN wrote: Hello, I have a few reports appended in one excel sheet. I want to be able to select the specific range of one report and cut so that I can paste into either new sheet or workbook. Example, Column A contains the report name and at end contains the total Line items (Report name) Data Total Line Items (end of report So would like to select this portion. Hope I'm making sense. Please advise any info. Thanks, Juan . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello Frank
just to let you know, I was able to figure out what I wanted. So thanks alot for the info you provided. Juan -----Original Message----- Hi try something like sub foo() dim lastrow as long Dim firstrow as long Dim rng as range with activesheet lastrow = .Cells(Rows.Count, 1).End(xlUp).Row -1 firstrow = 2 set rng = .range("A" & firstrow & ":A" & lastrow) msgbox rng.address end with end sub -- Regards Frank Kabel Frankfurt, Germany JUAN wrote: Hello, I have a few reports appended in one excel sheet. I want to be able to select the specific range of one report and cut so that I can paste into either new sheet or workbook. Example, Column A contains the report name and at end contains the total Line items (Report name) Data Total Line Items (end of report So would like to select this portion. Hope I'm making sense. Please advise any info. Thanks, Juan . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
select a range in a column | Excel Discussion (Misc queries) | |||
Select range using row and column number addresses | Excel Discussion (Misc queries) | |||
Select Range based on column name and not A1 notations | Excel Discussion (Misc queries) | |||
Select a Range of column depending on the date | Excel Worksheet Functions | |||
select date range in column | Excel Worksheet Functions |