+ Reply to Thread
Results 1 to 5 of 5

Use the SMALL Function in VBA

  1. #1
    Valued Forum Contributor
    Join Date
    11-20-2003
    MS-Off Ver
    2010, 2016
    Posts
    1,174

    Use the SMALL Function in VBA

    In spreadsheet, I have invoice numbers in columns A-F, I need to combine(concat) the cells and enter result in column G. I have macro that will do this however, I want to list the invoices numbers from lowest to highest in column G. I was trying to use the SMALL function within the VBA but can't seem to figure out a solution. Thanks. (small sample attached w/ expected results if needed).

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by maacmaac; 12-27-2011 at 05:30 PM.

  2. #2
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: Use the SMALL Function in VBA

    try this

    Please Login or Register  to view this content.
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

  3. #3
    Valued Forum Contributor
    Join Date
    11-20-2003
    MS-Off Ver
    2010, 2016
    Posts
    1,174

    Re: Use the SMALL Function in VBA

    Tom,

    I was looking again at my data and some of the rows contain less that 6 invoice numbers. I should have mentioned in my first post...sorry. For example, row number 5 may have an invoice number for columns 1,2,3 but columns 4,5,6 are blank. With this occurs, it is creating a run time error. Thanks

  4. #4
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: Use the SMALL Function in VBA

    look at attachment

  5. #5
    Valued Forum Contributor
    Join Date
    11-20-2003
    MS-Off Ver
    2010, 2016
    Posts
    1,174

    Re: Use the SMALL Function in VBA

    Working now. Thank you

+ 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