i am a novice in VBA programming. I am looking to call a variable
within a string.
for example
a = quot;E13quot; (Cell reference)
Range(quot;a: L30quot;).select (Giving me error because variable a cannot
be called in within the Range)
I intend to select cells in the range E 13 to L 30. Any way to make
this work? Basically the starting cell of this range is dynamic and I
want to select that range.
Thanks,
RachitHi Rachit,
range(a amp; quot;:l30quot;).Select
--
Kind regards,
Niek Otten
gt; wrote in message oups.com...
|i am a novice in VBA programming. I am looking to call a variable
| within a string.
|
| for example
|
| a = quot;E13quot; (Cell reference)
| Range(quot;a: L30quot;).select (Giving me error because variable a cannot
| be called in within the Range)
|
| I intend to select cells in the range E 13 to L 30. Any way to make
| this work? Basically the starting cell of this range is dynamic and I
| want to select that range.
|
| Thanks,
| Rachit
|
thanks a lot... also another question..
if i know that a cell row is i and cell column is j (i and j are
variables), how do i get it in the regular cell address
(Alphabet-number) format..like i=5, j= 13, how do i get E 13
and assign it as
a = quot;e13quot;
thanks again!Cells(i,j).Value = quot;aquot;
BTW if i is row and =5, and j is column and 13, then you are talking M5 not
E13.
--
HTH
Bob Phillips
(remove xxx from email address if mailing direct)
gt; wrote in message ups.com...
gt; thanks a lot... also another question..
gt;
gt; if i know that a cell row is i and cell column is j (i and j are
gt; variables), how do i get it in the regular cell address
gt; (Alphabet-number) format..like i=5, j= 13, how do i get E 13
gt; and assign it as
gt;
gt; a = quot;e13quot;
gt;
gt; thanks again!
gt;
Hi Rachit,
cells(i,j).address(false,false)
Please start a new thread for a new question
--
Kind regards,
Niek Otten
gt; wrote in message ups.com...
| thanks a lot... also another question..
|
| if i know that a cell row is i and cell column is j (i and j are
| variables), how do i get it in the regular cell address
| (Alphabet-number) format..like i=5, j= 13, how do i get E 13
| and assign it as
|
| a = quot;e13quot;
|
| thanks again!
|
i think i have not put it correctly. I do not want to assign quot;aquot; to
E13, rather i want to assign the string E13 which is obtained through
i=13, j=5 (i and j are variables) to a variable called 'a'.Well in that case you want Niek's alternative solution, but you will still
get M5 with those variable values, not E13. If i is row it should be 13 not
5!
--
HTH
Bob Phillips
(remove xxx from email address if mailing direct)
gt; wrote in message oups.com...
gt; i think i have not put it correctly. I do not want to assign quot;aquot; to
gt; E13, rather i want to assign the string E13 which is obtained through
gt; i=13, j=5 (i and j are variables) to a variable called 'a'.
gt;
Absolutely right. The order in the worksheet is Column, Row, (in the A1 Reference style; not in the R1C1 reference style) and in
all VBA functions it is Row, Column.
I don't even feel dumb anymore is I confuse them once more!
--
Kind regards,
Niek Otten
quot;Bob Phillipsquot; gt; wrote in message ...
| Well in that case you want Niek's alternative solution, but you will still
| get M5 with those variable values, not E13. If i is row it should be 13 not
| 5!
|
| --
| HTH
|
| Bob Phillips
|
| (remove xxx from email address if mailing direct)
|
| gt; wrote in message
| oups.com...
| gt; i think i have not put it correctly. I do not want to assign quot;aquot; to
| gt; E13, rather i want to assign the string E13 which is obtained through
| gt; i=13, j=5 (i and j are variables) to a variable called 'a'.
| gt;
|
|
How can I use Excel to achieve the following
1) I wish to split a concatenated string into a column of separate characters
“ThisIsText”
should become..
“t
h
i
s
i
s
t
e
x
t”.
2) After this I wish to display a predefined row beside every character
t “xyz” “x1w” “234.1w”
h “sdf” “w21” “12.5s”
i “wer” “we2” “123.e”
..
..
..
Thank You
Natarajan Ganesan
- Apr 13 Sun 2008 20:43
calling variable within string
close
全站熱搜
留言列表
發表留言
留言列表

