+ Reply to Thread
Results 1 to 3 of 3

Two "identical" array formulas, one works but the other doesn't, please help!

  1. #1
    Registered User
    Join Date
    06-16-2021
    Location
    Leeds
    MS-Off Ver
    2019 I think
    Posts
    2

    Unhappy Two "identical" array formulas, one works but the other doesn't, please help!

    So I am using a spare sheet (Workings -hide) to pull info from my main sheets into a list format. I have successfully done this on rows 3-33 using the array formula

    =IFERROR(INDEX('Invoice queries'!$C$4:$C$200,SMALL(IF('Workings -hide'!$B$1='Invoice queries'!$B$4:$B$200,ROW('Invoice queries'!$C$4:$C$200)-3," "),ROW()-2)), "")

    This nicely pulls any invoice numbers that are listed onto the Invoice queries sheet into a list under each supplier name.

    I am now trying to do the same thing in cells 35-85 to pull info from the "With purchasing" sheet. I am using this formula

    =IFERROR(INDEX('With purchasing'!$C$4:$C$200,SMALL(IF('Workings -hide'!$B$1='With purchasing'!$B$4:$B$200,ROW('With purchasing'!$C$4:$C$200)-3," "),ROW()-2)), "")

    I have no idea why it's not working but I also don't really understand the formula in the first place.

    Please help! Both the With purchasing and Invoice queries sheets have the company names listed from B4 downwards and the invoice numbers from C4 downwards.

  2. #2
    Registered User
    Join Date
    06-16-2021
    Location
    Leeds
    MS-Off Ver
    2019 I think
    Posts
    2

    Re: Two "identical" array formulas, one works but the other doesn't, please help!

    I have just moved the second array onto a separate sheet instead of putting it on the Workings -hide sheet and now it works. Could anybody explain why?

  3. #3
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365 Version 2404
    Posts
    1,259

    Re: Two "identical" array formulas, one works but the other doesn't, please help!

    Change the K argument "ROW()-2" of the SMALL function to ROWS(A$1:A1):
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    At row 3, ROW() = 3. So ROW()-2 = 1, i.e., the first row with relevant data.
    At row 35, ROW() = 35. So ROW()-2 at that row results 35 - 2, i.e., the 33rd row with relevant data.

    Good luck!

+ 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: 5
    Last Post: 02-05-2019, 12:03 AM
  2. [SOLVED] Macro doesn't correctly replace "." with "," and getting Run-time error '1004'.
    By H.Gabor in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 07-26-2018, 06:36 AM
  3. [SOLVED] Rank function using "array IF" formula as ref doesn't seem to work
    By vizzkid in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-11-2014, 09:47 AM
  4. "If statement" works, but not "select case". What am I doing wrong?
    By max3732 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-19-2014, 12:39 PM
  5. [SOLVED] Pasting values between ranges in different workbooks: "Range" works but "Cells" doesn't
    By Flaubert in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-13-2013, 01:19 PM
  6. Open files from FTP server (works with "servername" but doesn't work with "ip address")
    By adammsu1983 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-24-2012, 04:30 PM
  7. If changed array formula reduce ""\""\""\ - signs to #Missing, will it make ...
    By Maria J-son in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-05-2006, 08:25 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