+ Reply to Thread
Results 1 to 3 of 3

Array and sum under headers

  1. #1
    Registered User
    Join Date
    07-14-2013
    Location
    N/A
    MS-Off Ver
    Excel 2021 - 64 bit on Win11
    Posts
    42

    Array and sum under headers

    Hello,

    All values in row A and B come from a csv file that can be totally different, short or long, this mean that my headers C2, D2, E2,… also change from 5 till sometime 250 to the right.

    When I push ‘Sort’ VBA make from the unique values in column B my headers in column C2, D2, E2, F2, G2,… and sort the correspondent values under the correct headers/titles.

    For realize all above I use column K but my question is now; can I put the values in an array so I don’t need no more to work with column K?
    The next question is; how can I have automatically the sum of rows C, D, E, F, G,…. above or under the headers/titles.

    Thank you very much to read this!

    Greetings from Giake
    Attached Files Attached Files

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Array and sum under headers

    You coluld do this without VBa and Buttons.

    Drag C2 across as far as you reasonably expect your data to require, and a bit more for luck.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Then in C3 this CSE Array, this must be confirmed with Ctrl+Shift+Enter not just Enter, before dragging across and down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  3. #3
    Registered User
    Join Date
    07-14-2013
    Location
    N/A
    MS-Off Ver
    Excel 2021 - 64 bit on Win11
    Posts
    42

    Re: Array and sum under headers

    Thank you very much Marcol, you are very smart!
    this work like a charm

+ 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. [SOLVED] Delete entire Columns based on different Headers (Array)
    By WITJ in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-13-2013, 02:46 PM
  2. [SOLVED] Array Formula to print out column headers
    By DublinMeUp in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-09-2012, 04:18 PM
  3. [SOLVED] Listbox column headers when data is collected in an array
    By evertjvr in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-12-2012, 09:44 PM
  4. Replies: 2
    Last Post: 05-09-2012, 01:30 PM
  5. VBA Headers and Array
    By Topdrop18 in forum Excel Programming / VBA / Macros
    Replies: 26
    Last Post: 01-19-2010, 06:22 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