Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default When you select a range with a macro

Hello,

When you select a range with a macro, via End xldown etc... I would like to
select this range minus 1 column, how is this possbiel in excell

Regards

Patrick


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default When you select a range with a macro

Patrick,

Use Resize. Assuming that you have set the selected range to a variable
called tbl, this will cut back 1 column

tbl.Resize(tbl.Rows.Count, _
tbl.Columns.Count - 1).Select


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Patrick" wrote in message
. be...
Hello,

When you select a range with a macro, via End xldown etc... I would like

to
select this range minus 1 column, how is this possbiel in excell

Regards

Patrick




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 391
Default When you select a range with a macro

DIM Cell as Range

SET Cell = Range("B65000").End(xlUp).Offset(0,-1)


Patrick Molloy
Microsoft Excel MVP


-----Original Message-----
Hello,

When you select a range with a macro, via End xldown

etc... I would like to
select this range minus 1 column, how is this possbiel

in excell

Regards

Patrick


.

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 range in macro Chris Excel Discussion (Misc queries) 1 February 19th 10 01:33 PM
Select range then copy rows macro noggins Excel Discussion (Misc queries) 1 October 18th 09 11:06 PM
How do I select a range using a macro? brettopp Excel Discussion (Misc queries) 3 November 8th 06 11:40 PM
Using macro to select a range Rob Excel Worksheet Functions 3 November 6th 06 08:31 PM
select a range in a macro Andrew Excel Discussion (Misc queries) 3 May 10th 06 08:45 PM


All times are GMT +1. The time now is 12:35 AM.

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

About Us

"It's about Microsoft Excel"