+ Reply to Thread
Results 1 to 2 of 2

Need to break one long column into smaller columns then apply function to each column

  1. #1
    Registered User
    Join Date
    07-09-2019
    Location
    California, USA
    MS-Off Ver
    2018 Excel
    Posts
    1

    Need to break one long column into smaller columns then apply function to each column

    I have one large data set that is all in one column (131000+ values) and I need to divide it up so that I can take the average of every 1500 values (in the order that they started in, no sorting). So I need the average of 1:1500, then 1501:3000, and so forth. My idea was that I could divide the original long list of data into separate columns, 1500 values each, and then apply the averaging function to each column. Can anyone help me accomplish these two steps?

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,731

    Re: Need to break one long column into smaller columns then apply function to each column

    You don't really need to split up the long column in order to get averages over each set of 1500 rows, although it could be done using an INDEX formula, and then an average function for each column.

    However, if you want to leave it as it is and just have the averages, then assuming the data is in column A starting at A1 (no headings), then you could put this formula in C1:

    =AVERAGE(INDEX(A:A,(ROWS($1:1)-1)*1500+1):INDEX(A:A,ROWS($1:1)*1500+1))

    This will give you the average for the rows 1-1500, and when you copy it down you will get averages for the rows 1501-3000, 3001-4500, 4501-6000, and so on in consecutive cells.

    Hope this helps.

    Pete

    EDIT: Sorry - you should remove the final +1 from the formula, like this:

    =AVERAGE(INDEX(A:A,(ROWS($1:1)-1)*1500+1):INDEX(A:A,ROWS($1:1)*1500))

    I've shown it in red in the original formula.

    Hope this helps.

    Pete
    Last edited by Pete_UK; 07-09-2019 at 07:19 PM.

+ 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] One Long Column to Two Columns
    By ctkuhn in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-28-2019, 04:59 AM
  2. [SOLVED] Apply VBA Script based on Text in one column and apply a formula in another column
    By vvincent in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-07-2016, 09:19 PM
  3. Converting long column to multiple smaller columns
    By bjcowen9000 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-22-2016, 01:54 PM
  4. Break long column into a specified number of rows
    By rcarter86 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-03-2015, 06:26 PM
  5. Replies: 3
    Last Post: 01-12-2013, 03:12 PM
  6. Replies: 5
    Last Post: 05-04-2011, 06:51 PM
  7. Replies: 0
    Last Post: 07-31-2006, 12:13 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