+ Reply to Thread
Results 1 to 5 of 5

Array formula headache

  1. #1
    Registered User
    Join Date
    08-13-2015
    Location
    Cleveland, Ohio
    MS-Off Ver
    2010
    Posts
    3

    Array formula headache

    Hey guys,

    I need some help with an array formula, honestly i'm terrible at them and don't even know where to start. I need the values in columns M and N to show up in columns R and T respectively, without spaces. Sometimes there will be no data in (M4:M9) and it will instead be in (M11:M13) etc etc. Any help would be greatly appreciated! example.xlsx The data on sheet 2 is what I'm looking at.

    Thanks!

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Array formula headache

    Using Sheet2 of your posted workboo...

    I created this helper column that identifies targeted rows just for demo purposes. (you can embed that formula in the main formulas)
    Please Login or Register  to view this content.
    These formulas begin the list of Fruit names and Quality
    Please Login or Register  to view this content.
    Copy those formulas down as far as you need.

    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Array formula headache

    You cannot enter Arrayed formulas into merged cells. You can merge the cells after the formula is there. So unmerge R:U

    In R7, copied down

    =IFERROR(INDEX(M$4:M$16, SMALL(IF(M$4:M$16<>"", ROW($M$4:$M$16)-ROW($M$4)+1), ROWS($A$1:$A1))),"")

    In T7 copied down
    =IFERROR(INDEX(N$4:N$16, SMALL(IF(N$4:N$16<>"", ROW($M$4:$M$16)-ROW($M$4)+1), ROWS($A$1:$A1))),"")
    both arrayed formulas
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Array formula headache

    The first thing you NEED to do is to get rid of all those merged cells. All they do is cause problems.

    With that being done...

    This array formula** entered in R7:

    =IFERROR(INDEX(M:M,SMALL(IF(M$4:M$16<>"",ROW(M$4:M$16)),ROWS(R$7:R7))),"")

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    This formula entered in T7:

    =IF(R7="","",VLOOKUP(R7,M:N,2,0))

    Select R7:T7 and copy down until you get blanks.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,881

    Re: Array formula headache

    Reply discarded.
    Last edited by JohnTopley; 08-17-2015 at 01:30 PM.

+ 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] Multiple if/or formula headache; please help!
    By pembr0ke in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-09-2015, 11:12 AM
  2. Simple formula MAJOR headache.
    By joe4 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-23-2008, 09:35 AM
  3. Formula headache!
    By JoeyG in forum Excel General
    Replies: 0
    Last Post: 04-03-2007, 04:18 PM
  4. what a headache please help
    By Crasher in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-28-2006, 07:02 PM
  5. Frequency Headache
    By Rothman in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 03-09-2006, 05:30 PM
  6. Cure my array headache!
    By grime in forum Excel General
    Replies: 7
    Last Post: 07-27-2005, 03:38 PM
  7. Replies: 0
    Last Post: 07-27-2005, 11:05 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