+ Reply to Thread
Results 1 to 5 of 5

Split match array results into new worksheets

  1. #1
    Registered User
    Join Date
    01-30-2020
    Location
    UK
    MS-Off Ver
    2013
    Posts
    82

    Split match array results into new worksheets

    Hi there,

    I've done some research and pulled together some code from other threads but a bit stuck now...

    I'm trying to split some data based on two columns with criteria which one has a user input box. Then with the output array I need to split the results into new worksheets/workbooks based upon row count from another input box. New workbooks to be saved with sequential number order.

    Kind regards


    Please Login or Register  to view this content.
    Last edited by warp765; 02-18-2020 at 08:44 AM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Split match array results into new worksheets

    I am assuming the values in column C are numeric, not text. Your pseudo code above would not work for actual NUMERIC tests, only for text comparisons. If you search for 1 in a cell with a value 15, it will match using INSTR. So I did not use that.

    If the column C values are actually text strings, we'll need to discuss exactly what those strings look like for all the 1-17 examples to be sure we get an accurate test.

    Meanwhile, using straight numeric testing in column C, this seems to work.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    01-30-2020
    Location
    UK
    MS-Off Ver
    2013
    Posts
    82

    Re: Split match array results into new worksheets

    Thanks @JBeaucaire thank works perfectly!

    There is one problem, underrelated to your additional code that you may be able to help with.

    'DMA Value' is 1-17, so at the moment when the user enters '1' they also get the results for 10-17. Any thoughts?

    Thanks

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Split match array results into new worksheets

    That shouldn't be happening with my code above. I spoke of this and your original use of "INSTR()" method, I did not use that for Column C, I used an exact VALUE match. 10-17 are not matches to 1 so that shouldn't happen. I'd need to see what you're seeing.

    On the off chance I uploaded the wrong last version, here it is again.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-30-2020
    Location
    UK
    MS-Off Ver
    2013
    Posts
    82

    Re: Split match array results into new worksheets

    My error, that code works fantastic thank you!

+ 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. [SOLVED] Match 3 cells are equal or not, return results in a row array
    By lmattenl in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-17-2019, 03:50 AM
  2. [SOLVED] Index/Match only returning results from 1st in array cosntant
    By smorice in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-21-2019, 04:25 PM
  3. (SOLVED) help with Array to look up multiple match results from column
    By clundeen in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-03-2017, 12:24 PM
  4. Sum of multiple Index/Match results using array formula
    By cray36 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-25-2015, 11:12 PM
  5. [SOLVED] Index/Match Array with multiple results concatenate in one cell
    By samiesosa in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-15-2013, 01:34 PM
  6. Match Closest Results from Data Array
    By TheRobsterUK in forum Excel General
    Replies: 2
    Last Post: 09-29-2005, 08:48 AM
  7. split results to multiple worksheets
    By Rich in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-11-2005, 03:06 PM

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