+ Reply to Thread
Results 1 to 9 of 9

Array formula help

  1. #1
    Registered User
    Join Date
    11-11-2015
    Location
    North Carolina, USA
    MS-Off Ver
    2013
    Posts
    92

    Array formula help

    Hi,

    I'm trying to use a formula I've used before but not it's giving me a reference error. I'm trying to move the data from sheet two over into sheet one so that instead of being on a single row it gets transposed into the column where Column A matches for both sheets.

    The formulas I was using is:

    =IF(INDEX(Sheet2!$A$2:$K$8,MATCH(Sheet1!A2,Sheet2!$A$2:$A$8,0),SMALL(IFERROR(COLUMN($A$1:$K$1)/(LEFT(Sheet2!$A$1:$K$1,3)="Qty"),100000),COUNTIFS(A$2:A2,A2)))=0,"",INDEX(Sheet2!$A$2:$K$8,MATCH(Sheet1!A2,Sheet2!$A$2:$A$8,0),SMALL(IFERROR(COLUMN($A$1:$K$1)/(LEFT(Sheet2!$A$1:$K$1,3)="Qty"),100000),COUNTIFS(A$2:A2,A2))))

    =IF(CV2="","",INDEX(Sheet2!$A$2:$K$8,MATCH(Sheet1!A2,Sheet2!A$2:A$8,0),SMALL(IFERROR(COLUMN($A$1:$K$1)/(LEFT(Sheet2!$A$1:$K$1,3)="Pri"),100000),COUNTIFS(A$2:A2,A2))))

    I attached a sample workbook.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    11-11-2015
    Location
    North Carolina, USA
    MS-Off Ver
    2013
    Posts
    92

    Re: Array formula help

    I've also posted this at:
    https://chandoo.org/forum/threads/he...formula.37481/

    https://www.mrexcel.com/forum/excel-...ml#post5014834
    Last edited by lwilt; 02-22-2018 at 12:12 PM.

  3. #3
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Array formula help

    Showing us the desired results is much better than showing us a non-working formula.

    Please update your sample workbook to show the desired results, which you can enter manually.

  4. #4
    Registered User
    Join Date
    11-11-2015
    Location
    North Carolina, USA
    MS-Off Ver
    2013
    Posts
    92

    Re: Array formula help

    My apologizes. I re-attached the workbook with a sheet that has what I want the desired output to look like.
    Attached Files Attached Files

  5. #5
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Array formula help

    First, fill in the blank cells in column A with the correct sku's (let us know if you need help with this).

    Then you can use this in T2:

    =INDEX(Sheet2!$B$2:$K$8,MATCH($A2,Sheet2!$A$2:$A$8,0),SMALL(IF(LEFT(Sheet2!$B$1:$K$1)=T$1,COLUMN(Sheet2!$B$1:$K$1)-1),COUNTIF($A$2:$A2,$A2))) Ctrl Shift Enter

    Drag the formula to the right then down.

  6. #6
    Registered User
    Join Date
    11-11-2015
    Location
    North Carolina, USA
    MS-Off Ver
    2013
    Posts
    92

    Re: Array formula help

    Quote Originally Posted by 63falcondude View Post
    First, fill in the blank cells in column A with the correct sku's (let us know if you need help with this).

    Then you can use this in T2:

    =INDEX(Sheet2!$B$2:$K$8,MATCH($A2,Sheet2!$A$2:$A$8,0),SMALL(IF(LEFT(Sheet2!$B$1:$K$1)=T$1,COLUMN(Sheet2!$B$1:$K$1)-1),COUNTIF($A$2:$A2,$A2))) Ctrl Shift Enter

    Drag the formula to the right then down.
    Thank you...that brought over data for column T. Is there a way for it to not bring over 0 for the blanks? If there's not a simple change no worries I can sort the data at the end to remove them. Could you also help bring over data for column U as well?

  7. #7
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Array formula help

    Is there a way for it to not bring over 0 for the blanks?
    Assuming that there are no 0's in your data, you can use this:

    =IFERROR(1/(1/INDEX(Sheet2!$B$2:$K$8,MATCH($A2,Sheet2!$A$2:$A$8,0),SMALL(IF(LEFT(Sheet2!$B$1:$K$1)=T$1,COLUMN(Sheet2!$B$1:$K$1)-1),COUNTIF($A$2:$A2,$A2)))),"") Ctrl Shift Enter

    Could you also help bring over data for column U as well?
    You put the formula into T2 then drag it to the right (into column U) and then down.
    This will populate the numbers for columns T and U.

  8. #8
    Registered User
    Join Date
    11-11-2015
    Location
    North Carolina, USA
    MS-Off Ver
    2013
    Posts
    92

    Re: Array formula help

    Thank you for all your help!!

  9. #9
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Array formula help

    You're welcome. Thanks for the rep!

+ 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. Replies: 3
    Last Post: 04-02-2016, 08:16 PM
  2. Question about using Evaluate with an array of formulas not an array formula
    By Mr_Bill in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-19-2014, 03:26 PM
  3. Can I make the row lookup array/range part in an array formula variable?
    By OLLY-7 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-18-2014, 09:06 AM
  4. Array formula + Array formula with criteria that lookups a Table
    By anrichards22 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-16-2013, 11:41 AM
  5. Replace hard coded array in formula with link to input array
    By David Brown in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-08-2011, 07:45 AM
  6. Converting 3x10 array to a 1X30 array to run a Match formula
    By NBVC in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-08-2009, 07:45 AM
  7. [SOLVED] Tricky array formula issue - Using array formula on one cell, then autofilling down a range
    By aspenbordr in forum Excel Programming / VBA / Macros
    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