LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Concatenating a string and an integer

Hi,

I am trying to move down a column by varying a counter for the row.
Whether I use "B" & Str(RptRowCounter) or "B" + Str(RptRowCounter), the
resulting string is B 5. As a result, Range(B 5).Value is giving me
errors.

How do I avoid the blank in between so that I get B5?

Dim RptName As String
Dim RptRowCounter As Integer
Dim CellRefer As String

RptRowCounter = 5
CellRefer = "B" & Str(RptRowCounter)
RptName = Range(CellRefer).Value

Thanks for your help.
Aswini

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Concatenate two variables (String & Integer) Sreenivas Varadhan Excel Programming 3 December 12th 05 01:28 PM
ListBox2.AddItem ListBox1.Value becomes a String when being Integer? SIGE Excel Programming 2 March 30th 05 04:26 PM
Declaring variables (Long, String, Integer) and interpretation spe MrT Excel Programming 4 December 12th 04 12:43 PM
Is there a function to convert a string representing an integer i. perin Excel Programming 1 October 6th 04 09:36 PM
How can i write a vba code to get string or integer "C15" from $c$15? d Excel Programming 2 August 29th 03 06:11 PM


All times are GMT +1. The time now is 09:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"