Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 173
Default RESIZE range to exclude totals row


Simply need to copy the following range *excluding* the totals row, which is
always the bottom row.
Here's one of numerous attempts that doesn't work:

Range("ak1").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Resize(Rows.Count - 1, Columns.Count).Select

Any assistance would be greatly appreciated.
Thanx.
- Mike

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default RESIZE range to exclude totals row

This should do it

With Range("ak1")

.Resize(.End(xlDown).Row - 1, .End(xlToRight).Column).Select
End With



--
__________________________________
HTH

Bob

"MikeF" wrote in message
...

Simply need to copy the following range *excluding* the totals row, which
is
always the bottom row.
Here's one of numerous attempts that doesn't work:

Range("ak1").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Resize(Rows.Count - 1, Columns.Count).Select

Any assistance would be greatly appreciated.
Thanx.
- Mike



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 173
Default RESIZE range to exclude totals row

Bob,

Thanx for the reply.

The row part of it works fine, but it's taking *all* the columns to the
right, not just the 5, 6, 7, or whatever is there.
Is that happening on your end as well?


"Bob Phillips" wrote:

This should do it

With Range("ak1")

.Resize(.End(xlDown).Row - 1, .End(xlToRight).Column).Select
End With



--
__________________________________
HTH

Bob

"MikeF" wrote in message
...

Simply need to copy the following range *excluding* the totals row, which
is
always the bottom row.
Here's one of numerous attempts that doesn't work:

Range("ak1").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Resize(Rows.Count - 1, Columns.Count).Select

Any assistance would be greatly appreciated.
Thanx.
- Mike




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default RESIZE range to exclude totals row

Is this better?

With Range("ak1")

.Resize(.End(xlDown).Row - 1, .End(xlToRight).Column - .Column() +
1).Select
End With

--
__________________________________
HTH

Bob

"MikeF" wrote in message
...
Bob,

Thanx for the reply.

The row part of it works fine, but it's taking *all* the columns to the
right, not just the 5, 6, 7, or whatever is there.
Is that happening on your end as well?


"Bob Phillips" wrote:

This should do it

With Range("ak1")

.Resize(.End(xlDown).Row - 1, .End(xlToRight).Column).Select
End With



--
__________________________________
HTH

Bob

"MikeF" wrote in message
...

Simply need to copy the following range *excluding* the totals row,
which
is
always the bottom row.
Here's one of numerous attempts that doesn't work:

Range("ak1").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Resize(Rows.Count - 1, Columns.Count).Select

Any assistance would be greatly appreciated.
Thanx.
- Mike






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 173
Default RESIZE range to exclude totals row

Yes, that works.
Thank you.

"Bob Phillips" wrote:

Is this better?

With Range("ak1")

.Resize(.End(xlDown).Row - 1, .End(xlToRight).Column - .Column() +
1).Select
End With

--
__________________________________
HTH

Bob

"MikeF" wrote in message
...
Bob,

Thanx for the reply.

The row part of it works fine, but it's taking *all* the columns to the
right, not just the 5, 6, 7, or whatever is there.
Is that happening on your end as well?


"Bob Phillips" wrote:

This should do it

With Range("ak1")

.Resize(.End(xlDown).Row - 1, .End(xlToRight).Column).Select
End With



--
__________________________________
HTH

Bob

"MikeF" wrote in message
...

Simply need to copy the following range *excluding* the totals row,
which
is
always the bottom row.
Here's one of numerous attempts that doesn't work:

Range("ak1").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Resize(Rows.Count - 1, Columns.Count).Select

Any assistance would be greatly appreciated.
Thanx.
- Mike







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
Exclude data from summary totals when hidden XVOTE Excel Worksheet Functions 1 April 13th 06 03:37 PM
Exclude Header from Range? nastech Excel Discussion (Misc queries) 4 December 30th 05 02:49 PM
Exclude one range from another Charl Excel Programming 3 September 11th 05 12:26 PM
Exclude hidden data from summary totals XVOTE Excel Discussion (Misc queries) 2 June 3rd 05 05:26 AM
Range.Delete and Range.Resize.Name performance issues Test.File Excel Programming 0 February 15th 05 03:33 PM


All times are GMT +1. The time now is 12:26 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"