+ Reply to Thread
Results 1 to 3 of 3

Returning multiple values using Excel VBA code

  1. #1
    Registered User
    Join Date
    10-25-2018
    Location
    London
    MS-Off Ver
    2018
    Posts
    1

    Returning multiple values using Excel VBA code

    I'm undertaking some basket analysis in Excel using a VBA code that I found here, see below. What the code currently does is to return a list of the items attached to each order number. The issue I'm having is that it is just returning each item once, even if the item appears multiple times in each order. Could anyone suggest a change to the code that will solve this issue?
    Screen Shot 2018-10-25 at 10.49.57.png
    Please Login or Register  to view this content.
    Last edited by alansidman; 10-25-2018 at 06:12 AM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,882

    Re: Returning multiple values using Excel VBA code

    Code Tags Added
    Your post does not comply with Rule 2 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Valued Forum Contributor
    Join Date
    02-02-2016
    Location
    Indonesia
    MS-Off Ver
    Office 365
    Posts
    1,004

    Re: Returning multiple values using Excel VBA code

    Hi, mariaalexandra
    Try this code:
    I assumed the data is already sorted by col A (Order No), if it isn't the case then do it first.

    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)

Similar Threads

  1. VB - returning values from multiple, moving external Excel files
    By Cmiannay in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 06-30-2018, 11:01 AM
  2. Replies: 6
    Last Post: 04-01-2016, 05:40 PM
  3. [SOLVED] Two criteria Index Match on multiple sheets returning multiple values
    By Joak in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-21-2014, 10:03 AM
  4. [SOLVED] Excel - Returning multiple values in a single cell that match criteria
    By amazinz2006 in forum Excel General
    Replies: 13
    Last Post: 01-25-2014, 09:35 PM
  5. [SOLVED] search code not returning values
    By flyinghigher2011 in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 07-18-2013, 01:40 PM
  6. Vlookup returning multiple values for one value, Excel 2010
    By samp in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 01-17-2013, 04:31 AM
  7. Replies: 3
    Last Post: 09-06-2012, 09:07 AM

Tags for this Thread

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