+ Reply to Thread
Results 1 to 3 of 3

Trimming from first column and finding average from subsequent columns

  1. #1
    Registered User
    Join Date
    01-20-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2003
    Posts
    1

    Trimming from first column and finding average from subsequent columns

    I am having three columns in spreadsheet COL1, COL2 and COL3. Data is as below

    COL1 COL2 COL3
    MATH_S1 90 10
    MATH_S2 80 9
    MATH_S3 70 8
    ALGE_S1 95 18
    ALGE_S2 85 19
    ALGE_S3 75 20


    I want to trim the first four characters from col1, and find the average of col2 and col3, for whatever columns which matched col1. In other words, i want the output like this:

    MATH 80 9
    ALGE 85 19


    I am not able to come up with a perfect way to implement this. Please help guys.

  2. #2
    Valued Forum Contributor
    Join Date
    10-06-2008
    Location
    Norway
    MS-Off Ver
    2010
    Posts
    365

    Re: Trimming from first column and finding average from subsequent columns

    Hi, I woluld have added a column with =left(A2,4) to extract the categories, and then used a pivot table.
    Attached Files Attached Files

  3. #3
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,454

    Re: Trimming from first column and finding average from subsequent columns

    or you could use array functions (CTRL, SHIFT and ENTER) along the lines of this...

    =AVERAGE(IF(LEFT(A1:A6,4)="MATH",B1:B6,""))
    =AVERAGE(IF(LEFT(A1:A6,4)="MATH",C1:C6,""))
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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