Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default "Selection" Code???


Hi,
In my maco I current have a certain set of numbers selected. Is ther
any code to expand the selection to the cells in the two columns to th
left of this selection? i.e. if cells C1 to H4 were filled, but want A
to H4 selected, is this possible? Also, this was just an example,
don't want the code to specifically use these cells, just in genera
how to select the two columns that exist in front of my selection
Thanks

--
elaye
-----------------------------------------------------------------------
elayem's Profile: http://www.excelforum.com/member.php...fo&userid=1534
View this thread: http://www.excelforum.com/showthread.php?threadid=27015

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default "Selection" Code???

Hi elayem

You can try this

Selection.Offset(, -2).Resize(, Selection.Columns.Count + 2).Select

--
Regards Ron de Bruin
http://www.rondebruin.nl


"elayem" wrote in message ...

Hi,
In my maco I current have a certain set of numbers selected. Is there
any code to expand the selection to the cells in the two columns to the
left of this selection? i.e. if cells C1 to H4 were filled, but want A1
to H4 selected, is this possible? Also, this was just an example, I
don't want the code to specifically use these cells, just in general
how to select the two columns that exist in front of my selection.
Thanks.


--
elayem
------------------------------------------------------------------------
elayem's Profile: http://www.excelforum.com/member.php...o&userid=15344
View this thread: http://www.excelforum.com/showthread...hreadid=270152



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
"Center across selection" rather than "Merge cells" Elardus Excel Discussion (Misc queries) 10 November 6th 08 02:28 PM
VB Script: Code for "Sheets in selection" J@Y Excel Discussion (Misc queries) 1 February 9th 07 08:52 PM
Icon for "Wrap" and for "Centre Across Selection" BeSmart Excel Worksheet Functions 2 November 16th 05 06:44 PM
Can you "duplicate" "copy" listboxes and code to multiple cells? HotRod Excel Programming 1 September 1st 04 05:03 PM
Looking for VB code to test for "RING" , "BUSY" disconnects or other signals BruceJ[_2_] Excel Programming 3 November 20th 03 01:55 AM


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