Results 1 to 2 of 2

Thread: Excel Argument notation

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2007
    Posts
    79

    Excel Argument notation

    Hi I need to specify the columns of a Spreadsheet using arguments. This is what I need:

    ("B2:B38,C2:C122")

    And this is what I have

    Code:
    Dim Columns As String
    CellEnd = 122     
    CellBeg = 38
    
    Columns = (("B" & CellBeg & ":" & "B" & CellEnd)) & _
              (("C" & CellBeg & ":" & "C" & CellEnd))
    When I execute this line the result is Columns = ("B2:B38C2:C122")
    I DO NOT get the coma in between and that is giving me an error. What will be the right format to get this right? I am still trying to solve it.
    Thanks

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Aug 2007
    Posts
    79

    Re: Excel Argument notation

    Sorry for bothering, but I tried

    Columns = (("B" & GraphCellBeg & ":" & "B" & GraphCellEnd)) & "," & _
    (("C" & GraphCellBeg & ":" & "C" & GraphCellEnd))

    and it looks like it worked. Thanks anyway

Posting Permissions

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



Click Here to Expand Forum to Full Width