Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Hasan Bashara   on Oct 18 In MS Office Category.

  
Question Answered By: Joseph Evans   on Oct 18

Well, 'Range("A" & x).select' should select  the cell in column A in the row
represented by the number in x. Sounds as though x might not have a valid
value in it.

As far as I know, putting commas directly into the parameter list of a Range
call can only be used to describe the top left and bottom right of a
rectangle.

However, you can put commas inside a single string provided to Range as a
parameter - e.g. 'Range ("A1, C3, G2").select'. (Note that your example has
A! not A1. Is that a direct copy out of your code?). And, if you can do
that, you can construct a string that looks like that - just remember that
the commas are part of the string, not parameter separators.

I'm not sure how you can provide Range with R1C1 type information (in fact,
I believe you can't), so you need to use column letters.

I'm not sure why you need to select non-adjacent cells  from within code.
Have a look at your requirement and see if there is a different way of doing
it.

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on selecting non adjacent cells Or get search suggestion and latest updates.


Tagged: