+ Reply to Thread
Results 1 to 2 of 2

conditionally filling a VB array via excel

  1. #1
    Registered User
    Join Date
    10-27-2010
    Location
    a place
    MS-Off Ver
    Excel 2003
    Posts
    5

    conditionally filling a VB array via excel

    What I need is for upon a certain event, VB looks at excel and does:

    For each row on the active worksheet
    If ColumnA isn't empty
    AND ColumnB is empty
    Add CurrentRow# to the array.

    So the function will return an array of integers, ie 3 6 8 where those are the row numbers.
    Also this array then needs to be placed into a DropDownList,

    Any help would be appreciated

  2. #2
    Valued Forum Contributor
    Join Date
    06-17-2009
    Location
    Chennai,India
    MS-Off Ver
    Excel 2003,excel 2007
    Posts
    678

    Re: conditionally filling a VB array via excel

    quote
    then needs to be placed into a DropDownList,
    unquote
    It is not clear what is meant by dropdown list. I assumed that you want the row numbers in a range in the same sheet.


    Try this macro and the relevant row numbers will be in column E
    the first row of data (col A and B) will have column headings.
    that means data in these two columns start only from A2 B2

    sample data given below

    hdng1 hdng2
    1 1
    2
    2
    3 3
    4 5
    6
    5
    6 7
    7 8
    9
    10

    the macro is

    Please Login or Register  to view this content.

+ 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