+ Reply to Thread
Results 1 to 7 of 7

Long array formula into VBA

  1. #1
    Registered User
    Join Date
    10-21-2014
    Location
    Macedonia
    MS-Off Ver
    2010
    Posts
    69

    Long array formula into VBA

    Thanks to @TMS and his extensive knowledge the following formula was offered to me as a wonderful solution:

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


    But because I need a dynamic header in the resulting spreadsheet I must use VBA.

    Since it has to be an array, there is a limit of 255 characters. But because of my lack of knowledge with any of this I am unable to divide correctly:

    Please Login or Register  to view this content.
    I would like to apply the following workaround but do not know where the mistake is:

    Please Login or Register  to view this content.
    Maybe the code does not work with RC1 formula. I do not know. I am using Excel 2010.

    In the end I would like to apply this formula to column B as long as there is content in Column A.

    Thank you so much for your help.
    Last edited by gokica; 03-27-2023 at 03:07 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,753

    Re: Long array formula into VBA

    But because I need a dynamic header in the resulting spreadsheet I must use VBA.
    What does this mean?

    Have you seen my recent update to your previous thread?


    Fast answers need visual help. Please read the yellow banner at the top of this page on how to attach a file and a mocked up solution.

    Please ensure that the sample closely reflects the live file.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    10-21-2014
    Location
    Macedonia
    MS-Off Ver
    2010
    Posts
    69

    Re: Long array formula into VBA

    Thank you so much. Please accept my apologies. The project that I am trying to complete is more complex with multiple tasks.

    One of the hardest things for me to do was adding the interpunct with which you have helped extensively.

    Although initially I was planning VBA, your perfect formula paved the way to what I thought will be a perfect solution and to instead use formulas.

    Attached are two files. The original file is how the software is outputting the data. I need a VBA that will arrange it as per the amended sample attached.

    You will notice that the original spreadsheet has a title while in the resulting file this is supposed to be a header. I do not think that this is possible with a formula.

    Besides this I also need to sort column A so that cells starting with a character will go to a separate column while cells starting with indent before the text will go separately.

    The content will be the same in both spreadsheets although in the samples attached they are different. My mistake.

    Thank you so much.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    10-21-2014
    Location
    Macedonia
    MS-Off Ver
    2010
    Posts
    69

    Re: Long array formula into VBA

    Just an update. I made it work though formulas rather than VBA. In the end I will just manually add the header. All looks great thanks to the interpunct formula which I could never figure out on my own. Thank you so much TMS.

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,753

    Re: Long array formula into VBA

    Best to leave VBA alone unless you really need it. Unless you understand it, it is an unnecessary risk.

  6. #6
    Registered User
    Join Date
    10-21-2014
    Location
    Macedonia
    MS-Off Ver
    2010
    Posts
    69

    Re: Long array formula into VBA

    Agreed! Thank you so much once again. You are a miracle worker.

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,753

    Re: Long array formula into VBA

    You're welcome.

+ 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. Too long array formula to insert with VBA
    By KSimonsen87 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-24-2018, 03:11 PM
  2. [SOLVED] VBA for Long Array Formula
    By Dahlia in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-07-2018, 07:44 AM
  3. Long Array Formula in VBA (Help)
    By Hozcat in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-01-2017, 10:43 AM
  4. Writing long array formula in VBA?
    By maym in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-28-2017, 02:44 AM
  5. [SOLVED] Long Formula Array
    By henxan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-04-2014, 09:03 AM
  6. Long Array Formula VBA
    By maacmaac in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-27-2011, 08:57 AM
  7. Long Array Formula Problem
    By tnederlof in forum Excel General
    Replies: 12
    Last Post: 08-20-2009, 02:55 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