+ Reply to Thread
Results 1 to 8 of 8

Defining Arrays by Cell Borders

  1. #1
    Forum Contributor
    Join Date
    11-16-2011
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    405

    Defining Arrays by Cell Borders

    Hi guys,

    just need some help with defining arrays using cell borders.

    I need to write a macro that starts in cell A3.
    If cell has a TOP border then set variable rowTop = ActiveCell.Row
    go down to next row
    if cell has bottom border set rowBottom = ActiveCell.Row
    else go down to next row & LOOP previous steps

    Array = the range between these rows and column H

    Cheers

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Defining Arrays by Cell Borders

    One way:
    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    11-16-2011
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    405

    Re: Defining Arrays by Cell Borders

    Thanks Jerry,

    Works well! i've got to use these values found as the boundaries of my array

    & there is also multiple cells in column A that i want to find the Top and Bottom row for and also define them as the boundaries of other arrays.
    The name for each array is the value found in the top left cell of the array

    cheers

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Defining Arrays by Cell Borders

    Give me an example of you declaring an array if the top cell were A2 and the bottom cell were A10, then A15 and A17.

  5. #5
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Defining Arrays by Cell Borders

    If you post a sample workbook perhaps this can be done much simpler.



  6. #6
    Forum Contributor
    Join Date
    11-16-2011
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    405

    Re: Defining Arrays by Cell Borders

    Heres a copy of the data as received from an external program.

    This is how the Macro needs to operate:
    * Macro creates arrays of all data sets
    * Create New Worksheet
    * Look at Manifest data located on an external worksheet in the same folder
    * Paste the arrays on new worksheet in order found on the manifest worksheet
    (Note: the data received from external program is specific to each 'fld coordinator' who is the manager of the Crew Members below them.)
    * Delete the original Worksheet
    * Rename the new worksheet with the value found in cell B2 on that worksheet

    I've attached 3 files, 2 are reports (TB_31_10_2011 & RR_31_10_2011) the Manifest workbook should be referred to by the macro run from the reports to 'paste' the arrays into the order found on the manifest file

    cheers
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    11-16-2011
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    405

    Re: Defining Arrays by Cell Borders

    Please Login or Register  to view this content.
    How to I save each one of these ranges as an array as they are found? with the name of each array = to the value found in the first cell

    regards

  8. #8
    Forum Contributor
    Join Date
    11-16-2011
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    405

    Re: Defining Arrays by Cell Borders

    ***Bump***

    Any help would be appreciated

    Thnx

+ 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