+ Reply to Thread
Results 1 to 12 of 12

Assign array

Hybrid View

welchs101 Assign array 09-01-2011, 06:53 AM
StephenR Re: Need help assigning array 09-01-2011, 07:00 AM
welchs101 Re: Need help assigning array 09-01-2011, 10:18 AM
welchs101 Re: Need help assigning array 09-01-2011, 10:20 AM
Mordred Re: Need help assigning array 09-01-2011, 10:22 AM
welchs101 Re: Need help assigning array 09-01-2011, 03:09 PM
welchs101 Re: Need help assigning array 09-01-2011, 09:24 PM
Leith Ross Re: Need help assigning array 09-01-2011, 09:59 PM
  1. #1
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Need help assigning array

    Maybe this?
    Sub x()
    
    Dim r As Range, active_array
    
    For Each r In Columns(1).SpecialCells(xlCellTypeConstants).Areas
        If r.Rows.Count > 1 Then
            active_array = r.Resize(, 2)
            ' do stuff
            Erase active_array
        End If
    Next r

  2. #2
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,712

    Re: Need help assigning array

    Thanks for the response.

    Here is what i came up with but for some reason i am getting a type mismatch error


    active_array = ws.Range(Cell.Address(0, 0), ws.Cells(Cell.Row, Cell.End(xlDown)).End(xlDown).Offset(, 1))
    any ideas why?

  3. #3
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,712

    Re: Need help assigning array

    ok...i think i fixed it ............


    active_array = ws.Range(Cell.Address(0, 0), ws.Cells(Cell.Row, Cell.End(xlDown).Offset(, 1)))

    still working on it but this seems to work ..........if not i will let you guys know.

    actually the above did not work..........................below works ( i think)

    active_array = ws.Range(Cell.Address(0, 0), ws.Cells(Cell.Row, Cell.Column).End(xlDown).Offset(, 1))

    note: cell is a defined range
    Last edited by welchs101; 09-04-2011 at 09:13 PM.

+ 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