+ Reply to Thread
Results 1 to 4 of 4

VBA Arrays

  1. #1
    Registered User
    Join Date
    03-17-2019
    Location
    Muscatine, IA
    MS-Off Ver
    365
    Posts
    2

    VBA Arrays

    I am working on writing code in VBA to perform the procedure listed below.


    The list includes origin, destination, and flight #s of each flight.

    You are interested in flights that leave from any city in column E and end up at any city in column F. You need to list such flights in columns H, I, and J with their respective data. (see 2nd page for example)

    Write a VBA program using 1 dimensional arrays to do this.

    Your code should work even if the lists change.


    I've identified by array but can't figure out how to write code to copy flights that match the criteria and paste in the output columns. Can anyone help?
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by cgarcia8807; 03-17-2019 at 10:39 PM.

  2. #2
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MSO Home and Business 2024
    Posts
    7,338

    Re: VBA Arrays

    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  3. #3
    Registered User
    Join Date
    03-17-2019
    Location
    Muscatine, IA
    MS-Off Ver
    365
    Posts
    2

    Re: VBA Arrays

    Thanks. I've uploaded the spreadsheet.

  4. #4
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MSO Home and Business 2024
    Posts
    7,338

    Re: VBA Arrays

    Apparently this is a homework assignment as per your example file title.

    Therefore forum policy prohibits us from giving you direct answers. We can however put you on the right path to a solution.

    First of all you will need 3 arrays. 1 that holds your flight data (columns A, B & C), 1 that holds your origin data (column E) and the last one destination data (column F).

    Are you familiar with filling arrays ?

+ 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. storing multiple value in a single cell (through arrays or without arrays)?
    By mak51061 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 12-25-2014, 09:27 PM
  2. Declaring multiple multi-dimensional arrays (jagged arrays) - compile error?
    By dfribush in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-20-2013, 05:06 PM
  3. vba compare arrays and remove exact matching arrays
    By jacojvv in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 10-25-2013, 07:30 AM
  4. [SOLVED] New to arrays-where do I find a good beginners guide to multi dimensional arrays
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-04-2013, 07:44 PM
  5. Sum columns within arrays and then multiplying arrays [?]
    By slickpusher in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-08-2012, 08:50 PM
  6. Help With Arrays, real Basic Arrays
    By Markva in forum Excel General
    Replies: 3
    Last Post: 08-20-2008, 04:11 PM
  7. [SOLVED] Arrays - declaration, adding values to arrays and calculation
    By Maxi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-17-2006, 11:15 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