+ Reply to Thread
Results 1 to 3 of 3

How to include variable inside " "

  1. #1
    Registered User
    Join Date
    01-12-2005
    Posts
    4

    How to include variable inside " "

    If i wanna include a variable inside the space for text, how should i do it?

  2. #2
    Valued Forum Contributor
    Join Date
    07-11-2004
    Posts
    851
    =concatenate("do it like this",a1,"or this",a2)

    where a1 and a2 can be variables (cell with values or cells with formulas)
    not a professional, just trying to assist.....

  3. #3
    Registered User
    Join Date
    01-12-2005
    Posts
    4
    Sub Macro1()
    '
    ' Macro2 Macro
    ' Macro recorded 1/13/2005 by Scanner
    '

    '
    Dim i, j, no
    i = 1
    j = 4

    Do

    Range("A1:C96").Select
    Range("C96").Activate
    Selection.Copy
    Sheets.Add
    ActiveSheet.Paste
    ActiveWindow.LargeScroll Down:=2
    Range("B1:C96").Select
    Range("C96").Activate
    Application.CutCopyMode = False
    Charts.Add
    ActiveChart.ChartType = xlLine
    ActiveChart.SetSourceData Source:=Sheets("Sheet& j &").Range("B1:C96"), PlotBy _
    :=xlColumns
    ActiveChart.Location Where:=xlLocationAsNewSheet
    With ActiveChart
    .HasTitle = False
    .Axes(xlCategory, xlPrimary).HasTitle = False
    .Axes(xlValue, xlPrimary).HasTitle = False
    End With
    Sheets("Sheet1").Select
    Rows("1:96").Select
    Range("A96").Activate
    Selection.Delete Shift:=xlUp

    i = i + 1
    j = j + 1
    Loop Until (i = 5)
    End Sub


    For this part ----> ActiveChart.SetSourceData Source:=Sheets("Sheet& j &").
    original is ActiveChart.SetSourceData Source:=Sheets("Sheet1").

    i need it to go like .... ("Sheet1"), ("Sheet2"), ("Sheet3") .....

+ 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