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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
Assinging Range to mulitple selected cells?
|
Thread Tools | |
Display Modes | |
|
|
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 |