+ Reply to Thread
Results 1 to 3 of 3

array handling

  1. #1
    Registered User
    Join Date
    06-10-2015
    Location
    Germany
    MS-Off Ver
    2010
    Posts
    2

    array handling

    Hello,

    I am looking for a better way to handle my arrays. I do an import of a sheet with 9601 rows and 20 columns. The number of rows is flexible, so sometimes its 9600 + header-row and sometimes its just 4800 + header-row.

    So at first I count the number of rows (var RowLast) and divide by 96 (because each BL has 96 quarterhours).

    This is my vba, which is working (any advice ?) :
    Please Login or Register  to view this content.
    In my first column are strings(names), which are changing each 96rows.
    Instead of BLNames(i) I would like to use "String(2,1)". Is this possible ?

    Example:
    row 1 to 96, column 1: Audi A1
    row 97 to 192, column 1: Audi A3
    row 193 to 288, column 1: Audi A7

    MsgBox(Audi A1(2,1))
    MsgBox(Audi A3(2,1))
    MsgBox(Audi A7(2,1))

    Thanks in advance

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: array handling

    Hi,

    Why do you need VBA?
    It's highly probable that simple Excel functions can give you what you want. Upload the workbook and manually add the results you expect and tell us which are the result cells and if it's not obvious the logic you have used to arrive at the results.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    06-10-2015
    Location
    Germany
    MS-Off Ver
    2010
    Posts
    2

    Re: array handling

    Hi Richard,

    well, this is just one step of my VBA and I was looking for a better way to handle this arrays. I need to calculate some stuff based on the 20 columns. Also there is a strategy and logic, which needs to be integrated into my workbook. So I reckon its the best way to write all this stuff in VBA. I dont want to have a mix between in-sheet-calculations and vba. I also work with an matlab integration.

    Do you have any idea for a better array handling based on names (strings)?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: 11-03-2014, 04:23 PM
  2. Array handling questions
    By James McMurray in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-22-2008, 11:19 PM
  3. Handling of multidimensional array in Excel
    By DOES in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-20-2007, 10:35 AM
  4. Error handling with a handling routine
    By ben in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-15-2005, 11:06 AM
  5. Handling ubound on an uninitialised array
    By Mike NG in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 01-24-2005, 06:07 AM

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