+ Reply to Thread
Results 1 to 5 of 5

use Excel Formula to create variable with array value and drop row

Hybrid View

  1. #1
    Registered User
    Join Date
    10-14-2019
    Location
    Perú
    MS-Off Ver
    2019
    Posts
    20

    Question use Excel Formula to create variable with array value and drop row

    I found a solution in another post to SumIF but repeating multiple time same row as string to match is repeated:

    link 1: https://www.excelforum.com/excel-gen...ml#post5634185
    post #6

    but as the link 1 above show, is need manual work, and is not too elegant as the solution author mentioned.

    Question1: Anyone know if possible merge all their solution to one unique formula? this formula should store array and probably should manage 2D and 3D arrays.

    Question2: if not possible, then anyone could confirm than this is the excel formulas limit and is need VBA or another programming solution?

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,186

    Re: use Excel Formula to create variable with array value and drop row

    As always, you need to provide a workbook with the formulae in situ. You shuld not expect anyone to have to go hunting roung the forum to find bits and bobs to help you in this thread - EVERYTHING needs to be here, please.

    There are instructions at the top of the page explaining how to attach your sample workbook.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, relevant cells highlighted and a few explanatory notes.
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

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

    Re: use Excel Formula to create variable with array value and drop row

    1. Column P is populated using: =SUBSTITUTE(K4,";",",")
    2. Columns Q:BG re populated using: =TRIM(MID(SUBSTITUTE(","&$P4&" ",",",REPT(" ",255)),(COLUMNS($Q4:Q4))*255,255))
    These can be joined together (so that you don't need the helper column P), but you need to anchor the reference to K4:

    =TRIM(MID(SUBSTITUTE(","&SUBSTITUTE($K4,";",",")&" ",",",REPT(" ",255)),(COLUMNS($Q4:Q4))*255,255))

  4. #4
    Registered User
    Join Date
    10-14-2019
    Location
    Perú
    MS-Off Ver
    2019
    Posts
    20

    Re: use Excel Formula to create variable with array value and drop row

    thanks a lot Ms. AliGW.

    ... only curiously, is possible store such formula to a =cell or =array_variable? I mean using formula or anything, or is need use VBA?

    edit: I mean... in VBA you can do "Variable1 = Array(split("my_string";","))" , and what is the equivalent in excel using formulas?
    Last edited by JTM2019HYO; 02-20-2022 at 10:35 PM.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,186

    Re: use Excel Formula to create variable with array value and drop row

    I don't know what the equivalent of that would be as I don't do VBA.

    You can create array variables using the LET function, but only in MS365 and Excel 2021 - it's not available in Excel 2019.

+ 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. How to create multiple dependent drop-downs using array formulas in Excel?
    By manteigas in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-11-2021, 12:18 PM
  2. Using excel vba to create an if formula with variable columns
    By adles in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-05-2019, 05:57 PM
  3. [SOLVED] how to create an array of sheets and then compare them to a variable
    By dmcgov in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-19-2017, 03:14 PM
  4. Create an Array from Excel formula
    By cmore in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-11-2015, 08:04 AM
  5. 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
  6. [SOLVED] Create Class-level Array Variable
    By Dominicus in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-25-2012, 11:21 AM
  7. Replies: 2
    Last Post: 01-25-2012, 12:27 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