+ Reply to Thread
Results 1 to 2 of 2

How concate the string with number in Excel to pass in Range

  1. #1
    Registered User
    Join Date
    12-04-2010
    Location
    Karnataka, India
    MS-Off Ver
    Excel 2003
    Posts
    1

    Angry How concate the string with number in Excel to pass in Range

    Can some help me how to concatenate string and number ? Please find my code below:

    Dim nodCells As Range, weightageCells As Integer
    Dim selectedRng As String, tempVar As Integer
    tempVar = 0
    tempVar = Sheet1.Cells.Find(What:="*", _
    After:=Sheet1.Range("A1"), _
    Lookat:=xlPart, _
    LookIn:=xlFormulas, _
    SearchOrder:=xlByRows, _
    SearchDirection:=xlPrevious, _
    MatchCase:=False).Row


    Range("b2").Value = tempVar

    Set nodCells = Range("A1:a" + &tempVal)


    I am getting error at the last statement at &tempVal where tempVal is numeric.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: How concate the string with number in Excel to pass in Range

    Welcome to the forum.

    Please take a few minutes to read the forum rules, and then edit your post to add CODE tags.

    Thanks.
    Entia non sunt multiplicanda sine necessitate

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1