+ Reply to Thread
Results 1 to 9 of 9

splitting an array into columns based on criteria

  1. #1
    Registered User
    Join Date
    02-28-2014
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    35

    splitting an array into columns based on criteria

    Hi everyone,

    Please find the attached file splitting an array into columns help.xlsx. I am trying to convert the array in the column with the black font into multiple columns (red font). I am not quite familiar with Excel and am not sure if this can be done without writing a fancy VBA code.

    I would like to do it simply using an integrated function in excel.

    Thank you so much.

    AK.

  2. #2
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,373

    Re: splitting an array into columns based on criteria

    Perhaps something like this?
    Attached Files Attached Files
    Last edited by azumi; 07-09-2014 at 10:09 AM.

  3. #3
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: splitting an array into columns based on criteria

    Try this.....

    In J4
    Please Login or Register  to view this content.
    and copy across to N4.

    In J5 (Array Formula)
    Please Login or Register  to view this content.
    Copy across to N5 and down as far as needed.
    Attached Files Attached Files
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  4. #4
    Registered User
    Join Date
    02-28-2014
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    35

    Re: splitting an array into columns based on criteria

    Y'all are awesome!!

    THanks a bunch!

  5. #5
    Registered User
    Join Date
    02-28-2014
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    35

    Re: splitting an array into columns based on criteria

    @sktneer

    Could you explain how INDEX(COUNTIF($I$4:I4,$G$5:$G$26),0,0) works in conjunction with MATCH? Does INDEX see an array when we have COUNTIF($I$4:I4,$G$5:$G$26) embedded in the function?

    When I enter =COUNTIF($I$4:I4,$G$5:$G$26)
    and =INDEX(COUNTIF($I$4:I4,$G$5:$G$26),0,0)

    I get a return of 1.

    How does that work with Match to give me the row number right below array 'a' , 'b', and 'c'.

    I am trying to understand how the functions work.

    Thank you.

    AK

  6. #6
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: splitting an array into columns based on criteria

    Yes. COUNTIF($I$4:I4,$G$5:$G$26) (which provides an array of 1 and 0) here works as an array portion of Index formula which provides a lookup array to the Match function where Match function finds the position of first 0 value from the lookup array which in turn return the row number to the outer Index function.
    Sorry I am not very good in explaining.
    The best way to understand is to evaluate the formula several times for different cells in the formula bar itself by selecting the portion of a formula and pressing F9 (when done, press Esc) and see what values are being returned.

  7. #7
    Registered User
    Join Date
    02-28-2014
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    35

    Re: splitting an array into columns based on criteria

    Thank you @sktneer.

    Do you think if there is a way to make the formula return UNIQUE values from a list...?

    If it is very difficult, do not worry about it.

    Regar

  8. #8
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: splitting an array into columns based on criteria

    Refer to the Sheet attached in post#3.
    The formula in J4 which is copied to N4 is one which extracts the unique values from col. G (G5:G26). It is returning the unique values horizontally.
    If you want to return the unique values from the col. G vertically, try this formula.....

    In P4
    Please Login or Register  to view this content.
    and then drag down until you get blank cells.

    If that takes care of your original question, please mark your thread as Solved by selecting the Thread Tools (just above your first post) --> Mark thread as solved.
    Moreover you may also click on * (star) to Add Reputation to those who have put their time and efforts to help you in this forum. This is another way to say thanks to them.

  9. #9
    Registered User
    Join Date
    02-28-2014
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    35

    Re: splitting an array into columns based on criteria

    Thanks a lot!

    I will!

    AK

+ 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] Splitting Master Sheet Based on Different Columns Into Multiple Sheets
    By LISSANN in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-01-2013, 06:22 PM
  2. [SOLVED] Copy/Paste multiple columns as values based on another columns criteria
    By Dgp2012 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-28-2013, 06:50 AM
  3. Replies: 0
    Last Post: 09-15-2012, 02:56 AM
  4. Splitting Columns Based on Integer Values
    By Jiselle in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-24-2011, 11:07 AM
  5. Replies: 3
    Last Post: 11-13-2009, 12:05 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