A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Assinging Range to mulitple selected cells?



 
 
Thread Tools Display Modes
  #1  
Old July 23rd, 2004, 04:53 AM
gregga
external usenet poster
 
Posts: n/a
Default Assinging Range to mulitple selected cells?

If I use a range variable "rSelect" I can easily assign it to the
activecell in the active worksheet using...

rSelect = ActiveCell

But if the user selects multiple cells how do I assign rSelect...it
wont let me do it.

I have seen another macro that uses...

Selection.Copy

but I would like to manipulate those cells using a range before I paste
them somewhere else.

Am I right off track (usually the case!) or is there an obvious way to
do this?

Thanks.

Greg.


---
Message posted from http://www.ExcelForum.com/

  #2  
Old July 23rd, 2004, 05:44 AM
JE McGimpsey
external usenet poster
 
Posts: n/a
Default Assinging Range to mulitple selected cells?

One way:

Dim rSelect As Range
Set rSelect = Selection

If you want to be sure the selection is a range:

Dim rSelect As Range
If TypeName(Selection) = "Range" Then
Set rSelect = Selection
Else
MsgBox "No Range Selected"
End If


In article ,
gregga wrote:

If I use a range variable "rSelect" I can easily assign it to the
activecell in the active worksheet using...

rSelect = ActiveCell

But if the user selects multiple cells how do I assign rSelect...it
wont let me do it.

I have seen another macro that uses...

Selection.Copy

but I would like to manipulate those cells using a range before I paste
them somewhere else.

Am I right off track (usually the case!) or is there an obvious way to
do this?

  #3  
Old July 23rd, 2004, 07:54 AM
gregga
external usenet poster
 
Posts: n/a
Default Assinging Range to mulitple selected cells?

Thanks for your help.


---
Message posted from http://www.ExcelForum.com/

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel count cells in range with text Dave R. Worksheet Functions 3 May 12th, 2004 07:40 PM
Please help..activating array formulas in a range of cells without going cell by cell Karenna Worksheet Functions 3 March 1st, 2004 03:45 AM
Compare a cell to a range of cells Worksheet Functions 2 February 17th, 2004 09:43 AM


All times are GMT +1. The time now is 07:48 AM.


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