+ Reply to Thread
Results 1 to 6 of 6

Formula for picking out ALL, or FIRST and LAST, or ALL BUT ONE from a list?

  1. #1
    Forum Contributor
    Join Date
    01-11-2011
    Location
    Frederick, MD, USA
    MS-Off Ver
    Excel 2007
    Posts
    125

    Formula for picking out ALL, or FIRST and LAST, or ALL BUT ONE from a list?

    I got a block of data, for which I need to do several algebraic things. I've attached a sample worksheet; if I can figure out how to do what's in there, then I can do the rest.

    Essentially, I've got one column with a bunch of sample names, some of which are "STANDARD". I'd like to figure out how to do some math operations on three sets of data:

    1) All "STANDARDS"
    2) The first two and last STANDARD.
    3) Only the first three STANDARDS.

    The first one I can do...it's picking out "all but one" of them that is throwing me.
    Attached Files Attached Files
    Last edited by Gunther Maplethorpe; 08-01-2011 at 03:23 PM.

  2. #2
    Forum Contributor
    Join Date
    01-11-2011
    Location
    Frederick, MD, USA
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: Formula for picking out ALL, or FIRST and LAST, or ALL BUT ONE from a list?

    Bump....no one's got any ideas?

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Formula for picking out ALL, or FIRST and LAST, or ALL BUT ONE from a list?

    Here's some ideas. I used a dummy column though.
    Attached Files Attached Files
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,627

    Re: Formula for picking out ALL, or FIRST and LAST, or ALL BUT ONE from a list?

    Nice solution.

    I just wanted to add that when you using -- you don't need extra + (-- is + already).
    So,
    SUMPRODUCT(--($C$2:$C$27<3)+--($C$2:$C$27=4);$B$2:$B$27)/3
    become
    SUMPRODUCT(--($C$2:$C$27<3)--($C$2:$C$27=4);$B$2:$B$27)/3

    and furthermore, since you have two ranges adding them up together:

    SUMPRODUCT(($C$2:$C$27<3)+($C$2:$C$27=4);$B$2:$B$27)/3

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Formula for picking out ALL, or FIRST and LAST, or ALL BUT ONE from a list?

    Thanks Zbor!

  6. #6
    Forum Contributor
    Join Date
    01-11-2011
    Location
    Frederick, MD, USA
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: Formula for picking out ALL, or FIRST and LAST, or ALL BUT ONE from a list?

    Excellent work, lads...and much easier than the rather convoluted use of SMALL to coutn specific rows that I had half-bodged together in the interim...muchisimas gracias!

+ 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