Closed Thread
Results 1 to 3 of 3

storing a string into a variable

  1. #1
    Registered User
    Join Date
    01-11-2009
    Location
    Gold Coast, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5

    storing a string into a variable

    hi
    i just cant seem to store a string in a variable.

    Sub test()
    Dim Result As String
    Dim NextResult As String
    Dim i As Integer
    i = 0
    Sheets("RFIs").Select
    Range("A2").Select
    If IsEmpty(ActiveCell) = False Then

    'need to figure out how to store what "Left(ActiveCell, 7)" is as a string in Result
    'then once it loops thru again, store the next one into NextResult and compare this and Result

    Selection.Copy
    Sheets("Sheet1").Select
    Range("A33").Select
    ActiveSheet.Paste
    ActiveCell.FormulaR1C1 = Left(ActiveCell, 7)
    *******Result = ActiveCell

    With Selection.Interior
    .ColorIndex = 15
    .Pattern = xlSolid
    End With

    Sheets("RFIs").Select
    ActiveCell.Offset(1, 0).Select
    End If
    'Loop Until IsEmpty(ActiveCell) = True
    End Sub



    i am trying to store the a cell as a string and then eventually compare two strings. any help will be appreciated

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

    Re: storing a string into a variable

    Please take a few minutes to read the Forum Rules, and then edit your post to wrap your code with Code Tags.
    Entia non sunt multiplicanda sine necessitate

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

    Re: storing a string into a variable

    Thread closed.

Closed 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