Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default select a range base on Column A

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default select a range base on Column A

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default select a range base on Column A

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default select a range base on Column A

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
select a range in a column jimbo Excel Discussion (Misc queries) 4 December 10th 09 11:46 AM
Select range using row and column number addresses NDBC Excel Discussion (Misc queries) 4 July 22nd 09 06:51 AM
Select Range based on column name and not A1 notations T.Vidak Excel Discussion (Misc queries) 3 July 16th 08 02:02 PM
Select a Range of column depending on the date Battykoda via OfficeKB.com Excel Worksheet Functions 1 May 2nd 07 08:22 PM
select date range in column garlocd Excel Worksheet Functions 2 July 11th 06 06:23 AM


All times are GMT +1. The time now is 12:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"