+ Reply to Thread
Results 1 to 20 of 20

Modifying an Array?

  1. #1
    Registered User
    Join Date
    01-10-2024
    Location
    KS
    MS-Off Ver
    Office 365
    Posts
    8

    Arrow Modifying an Array?

    So I am fairly well-versed in Excel (I think?), but I don't know much about arrays. I'm trying to modify a spreadsheet made by someone else.

    Here's the formula:
    =IF(ISERROR(INDEX(Database!$A$1:$B$3000,SMALL(IF(Database!$CE$1:$CE$3000=$B$126,ROW(Database!$A$1:$A$3000)),ROW(234:234)),2)),"",INDEX(Database!$A$1:$B$3000,SMALL(IF(Database!$CE$1:$CE$3000=$B$126,ROW(Database!$A$1:$A$3000)),ROW(234:234)),2))

    It looks to me like it's accessing the Database tab and trying to find rows where the data in column CE matches the data in cell B126. This is good, but I don't want it to include that row if column CS (Database tab) has a certain value. Is there an easy way to do this?

    Also - this is a massive spreadsheet that takes several minutes to open. Are arrays formulas that require a lot of CPU power? If so, I'm hoping deleting a lot of these rows with the arrays will help the performance of this particular spreadsheet.

    Thanks in advance to anyone who is able to help!

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: Modifying an Array?

    Are you just trying to return a single column? if not what columns do you want?
    Also what is the "certain" value in col CS?

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,877

    Re: Modifying an Array?

    Welcome to the forum.

    Without the workbook, a guess (clear ALL formula results first)

    =IFERROR(FILTER(Database!$A$1:$B$3000,(Database!$CE$1:$CE$3000=$B$126)*(Database!$CS$1:$CS$3000<>certain_value)),"")

    Replace the bit in red with the value you wish to omit.

    Enter normally with just ENTER.
    Last edited by AliGW; 01-10-2024 at 11:44 AM.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  4. #4
    Registered User
    Join Date
    01-10-2024
    Location
    KS
    MS-Off Ver
    Office 365
    Posts
    8

    Re: Modifying an Array?

    This sheet creates a list of past due accounts and various data from each account (all from the Database tab).

    Here are one of the formulas to the right of the formulas above. This formula returns the value from the Database tab, column H for that account. There are 8 of these formulas, each returning the data for that account from a different column on the Database tab.
    =INDEX(Database!$C$12:$C$3000,MATCH($B382,Database!$B$12:$B$3000,0))&CHAR(10)&INDEX(Database!$H$12:$H$3000,MATCH($B382,Database!$B$12:$B$3000,0))

    Back to the original formula - I'd like it to exclude the account if Database column CS has a value of " CO".

    It would also be great if this list was sorted based on the value in Database column CO, instead of in the same order as these accounts appear on the Database tab, but that's not a necessity.

  5. #5
    Registered User
    Join Date
    01-10-2024
    Location
    KS
    MS-Off Ver
    Office 365
    Posts
    8

    Re: Modifying an Array?

    Quote Originally Posted by AliGW View Post
    Welcome to the forum.

    Without the workbook, a guess (clear ALL formula results first)

    =IFERROR(FILTER(Database!$A$1:$B$3000,(Database!$CE$1:$CE$3000=$B$126)*(Database!$CS$1:$CS$3000<>certain_value)),"")

    Replace the bit in red with the value you wish to omit.

    Enter normally with just ENTER.
    Thanks for the welcoming message and the reply! Will those additional arguments in the formula require a lot of additional CPU power? I'm not familiar with the FILTER function. Maybe I'm not as well-versed in Excel as I thought...

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: Modifying an Array?

    How about
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    01-10-2024
    Location
    KS
    MS-Off Ver
    Office 365
    Posts
    8

    Re: Modifying an Array?

    Quote Originally Posted by Fluff13 View Post
    How about
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    When I tried this I'm getting #SPILL! error

  8. #8
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: Modifying an Array?

    You need to clear all the rows below the formula.

  9. #9
    Registered User
    Join Date
    01-10-2024
    Location
    KS
    MS-Off Ver
    Office 365
    Posts
    8

    Re: Modifying an Array?

    Quote Originally Posted by AliGW View Post
    Welcome to the forum.

    Without the workbook, a guess (clear ALL formula results first)

    =IFERROR(FILTER(Database!$A$1:$B$3000,(Database!$CE$1:$CE$3000=$B$126)*(Database!$CS$1:$CS$3000<>certain_value)),"")

    Replace the bit in red with the value you wish to omit.

    Enter normally with just ENTER.
    I am also getting #SPILL! error when I try this formula. I must be doing something wrong.

  10. #10
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: Modifying an Array?

    See my previous post.

  11. #11
    Registered User
    Join Date
    01-10-2024
    Location
    KS
    MS-Off Ver
    Office 365
    Posts
    8

    Re: Modifying an Array?

    Quote Originally Posted by Fluff13 View Post
    You need to clear all the rows below the formula.
    I thought that might be it. Now I'm trying it on the first row in the list and still getting the same error though.

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,877

    Re: Modifying an Array?

    You are - if you attach the workbook, we can show you more easily.

    You need to clear ALL formula results BEFORE entering the formula.

  13. #13
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: Modifying an Array?

    Now I'm trying it on the first row in the list and still getting the same error though.
    Are you putting the formula in a Table, or a normal range?

  14. #14
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,877

    Re: Modifying an Array?

    And are you clearing the first row FULLY before entering the formula?

    Please attach the workbook.

  15. #15
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,877

    Re: Modifying an Array?

    There are instructions at the top of the page explaining how to attach your sample workbook (yellow banner: HOW TO ATTACH YOUR SAMPLE WORKBOOK).

  16. #16
    Registered User
    Join Date
    01-10-2024
    Location
    KS
    MS-Off Ver
    Office 365
    Posts
    8

    Re: Modifying an Array?

    Ok, I deleted everything below and started with the first row...

    I don't have a clue how this thing works, but it does! Thank you! I've always pasted formulas down as many rows as I needed it... never used one that can be put into the first row only and it populates the rows below it...

    I'd also like to do the same to some areas above (basically, past due accounts are divided into four sections: 30-59 days past due, 60-89 days, 90-119, and 120+).

    Many of the accounts over 120 days past due have been "charged off", hence the exclusion if they have the "CO" in the CS column.

    For example, the 60-89 formula is (B59 = "60-89"):
    =IF(ISERROR(INDEX(Database!$A$1:$B$3000,SMALL(IF(Database!$CE$1:$CE$3000=$B$59,ROW(Database!$A$1:$A$3000)),ROW(2:2)),2)),"",INDEX(Database!$A$1:$B$3000,SMALL(IF(Database!$CE$1:$CE$3000=$B$59,ROW(Database!$A$1:$A$3000)),ROW(2:2)),2))

    I'd also like these sorted by days past due, but there's no need to filter out the ones with "CO" in the CS column.

    I am also needing to hide any blank rows between the sections (i.e., 30-59 and 60-89 sections). This was formerly being done with a macro which hid any rows where #N/A appeared in column B (where the new formula will be).

    I'd be happy to share the workbook, but unfortunately it contains a large amount of confidential information.

  17. #17
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,877

    Re: Modifying an Array?

    You can desensitise the workbook - we don't need to see the whole thing, just a representative sample. It's going to be impossible without seeing the layout. A screenshot will NOT suffice!
    Last edited by AliGW; 01-10-2024 at 12:50 PM.

  18. #18
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,877

    Re: Modifying an Array?

    Feel free to take your time getting the sample ready - we shall still be here tomorrow.

  19. #19
    Registered User
    Join Date
    01-10-2024
    Location
    KS
    MS-Off Ver
    Office 365
    Posts
    8

    Re: Modifying an Array?

    Quote Originally Posted by AliGW View Post
    You can desensitise the workbook - we don't need to see the whole thing, just a representative sample. It's going to be impossible without seeing the layout. A screenshot will NOT suffice!
    How do I desensitise it?

  20. #20
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,877

    Re: Modifying an Array?

    Change sensitive details such as names to Mickey Mouse or Company 1, etc. Remember we only need to see a small subset of your data.

+ 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. Modifying a text document as its loaded into an array
    By DanielGent85 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-05-2023, 05:15 AM
  2. Replies: 5
    Last Post: 02-22-2018, 01:47 AM
  3. Help Modifying VBA based on inserting new row in same location on multiple sheets.
    By Iomega0318 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-07-2015, 12:21 PM
  4. [SOLVED] Help in Modifying Array Formula 082313
    By Pi* in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-12-2014, 06:57 AM
  5. Modifying Data inside an array
    By icdoo in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-16-2006, 02:35 PM
  6. [SOLVED] Modifying an Array Formula
    By carl in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-04-2005, 12:06 PM
  7. [SOLVED] help Modifying
    By ParTeeGolfer in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-27-2005, 07:06 PM

Tags for this Thread

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