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

Hello
I want the user selection of cells to always select the whole row of
selected cells but only starting from column B to column E.
Selection.EntireRow.Select works well but i need to deselect some
columns from this. any help would be great!
Thanks
Shorty

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 91
Default Expanding a Selection

ActiveCell.Range("A1:C1,E1,G1,I1:J1,L1,N1").Select

or

Range("A12:C12,E12,G12,J12:M12").Select

You may have to fiddle with this to meet your requirements

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default Expanding a Selection

In a module, add following subroutine:

Sub selBE()
Range(Cells(ActiveCell.Row, "B"), Cells(ActiveCell.Row, "E")).Select
End Sub

Associate a shortcut (Ctrl-S for instance)

HTH
--
AP

"Shorty" a écrit dans le message de
oups.com...
Hello
I want the user selection of cells to always select the whole row of
selected cells but only starting from column B to column E.
Selection.EntireRow.Select works well but i need to deselect some
columns from this. any help would be great!
Thanks
Shorty



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Expanding a Selection

wont that replace the user selected cells with predefinded range?

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Expanding a Selection

dim myRng as range
with activesheet
set myrng = intersect(.range("b:e"),selection.entirerow)
end with
msgbox myrng.address

Shorty wrote:

Hello
I want the user selection of cells to always select the whole row of
selected cells but only starting from column B to column E.
Selection.EntireRow.Select works well but i need to deselect some
columns from this. any help would be great!
Thanks
Shorty


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Expanding a Selection

Thanks, this one almost did it, the user can select multiple rows and
this only selects the last row in the selection.
Range(Cells(ActiveCell.Row, "B"), Cells(ActiveCell.Row, "E")).Select
but it selects the right columns which will come in useful!!!

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Expanding a Selection

ah ha fantastic this code does the trick. Selects the columns B to E
for the whole user selection. Thanks very much, problem solved in what,
17 mins, Thanks everyone!

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
Copy Selection - Transpose Selection - Delete Selection Uninvisible Excel Discussion (Misc queries) 2 October 23rd 07 04:18 PM
Expanding Selection aposatsk Excel Discussion (Misc queries) 3 August 16th 06 05:21 PM
sorting data and expanding the selection Barnet1 Excel Discussion (Misc queries) 2 January 23rd 06 01:50 PM
Expanding Selection Range Jim May[_4_] Excel Programming 5 August 30th 04 07:01 PM
expanding IF D[_5_] Excel Programming 1 May 7th 04 12:48 PM


All times are GMT +1. The time now is 03:19 PM.

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"