Operator definitions

N

Niklas

Hi
I can not find anything about the range operator ':',
union operator ' ' or the intersection operator ','
anywhere in MSDN. I want to know how to use them?

Set myRange = mySheet.Range("I:I,J:J,K:K
11:11,12:12,13:13")
myRange.Value = 1

For example I thought that the above code would put 1 into
the range I11:K13

Best regards
/Niklas
 
P

Patrick Molloy

':' is not an operator, simply a delimiter - read up on
range opbjects

Set myRange = mySheet.Range("I11:K13")
myRange.Value = 1

I you turned on the macro recorder, selected a range then
examone the code, you will see this. Rememberthat the
recorder is a fairly easy way to review code methods.

Patrick Molloy
Microsoft Excel MVP
 
N

Niklas

It was after I have read the Rang object documentation and
searches in MSDN that I made a post on the Internet.
Because the best I could find was "It can include the
range operator (a colon), the intersection operator (a
space), or the union operator (a comma).", but I want to
know what theese delimiters can do? I can not figure out
what the intersection delimeter is good for.
/Niklas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top