+ Reply to Thread
Results 1 to 9 of 9

Returning the values of a column, in increasing value, based on one additional criteria

  1. #1
    Registered User
    Join Date
    04-30-2010
    Location
    washington dc
    MS-Off Ver
    Excel 2007
    Posts
    51

    Returning the values of a column, in increasing value, based on one additional criteria

    Hi -

    So, i'm trying to simplify a complicated sheet using formulas. Unfortunately, I can't use a macro.

    Here is the situation. I have data in a table which has about 2,000 rows. What I need, is to have have a formula which displays values from A from small to large, filtered by column B.

    so, say I have 2 columns.


    Column A Column B
    Row 1 1 VM
    Row 2 2 VM
    R3 3 GL
    R4 4 GL
    R5 5 VM
    R6 6 VM


    Desired return in column C - the COlumn A values, increasing in value, limited to only those in which there is VM in Column B

    R1 1
    R2 2
    R3 5
    R4 6


    Does this make sense?

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,147

    Re: Returning the values of a column, in increasing value, based on one additional criteri

    Try

    in C1

    =IFERROR(SMALL(IF($B$1:$B$6="VM",$A$1:$A$6),ROWS($1:1)),"")

    Enter with Ctrl+Shift+Enter

  3. #3
    Registered User
    Join Date
    04-30-2010
    Location
    washington dc
    MS-Off Ver
    Excel 2007
    Posts
    51

    Re: Returning the values of a column, in increasing value, based on one additional criteri

    Thats great! One additional thing which I forgot to mention - can this be done with multiple critiera - so where B1: B6 ="VM", AND C1:C6 = "X".

    ?

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,147

    Re: Returning the values of a column, in increasing value, based on one additional criteri

    Try

    =IFERROR(SMALL(IF(($B$1:$B$6="VM")*($C$1:$C$6="X"),$A$1:$A$6),ROWS($1:1)),"")

  5. #5
    Registered User
    Join Date
    04-30-2010
    Location
    washington dc
    MS-Off Ver
    Excel 2007
    Posts
    51

    Re: Returning the values of a column, in increasing value, based on one additional criteri

    Shoot. It works but leaves gaps. See attached sheet.
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,147

    Re: Returning the values of a column, in increasing value, based on one additional criteri

    Sorry - I didn't re-iterate ...

    Enter with Ctrl+Shift+Enter

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,147

    Re: Returning the values of a column, in increasing value, based on one additional criteri

    Your desired results implies an OR condition : either "VM" OR "X"

    so should be

    =IFERROR(SMALL(IF(($A$2:$A$9="VM")+($B$2:$B$9="X"),$C$2:$C$9),ROWS($1:1)),"")

    Enter with Ctrl+Shift+Enter
    Last edited by JohnTopley; 11-14-2016 at 05:46 PM.

  8. #8
    Registered User
    Join Date
    04-30-2010
    Location
    washington dc
    MS-Off Ver
    Excel 2007
    Posts
    51

    Re: Returning the values of a column, in increasing value, based on one additional criteri

    Ah! Got it! Thanks John! Works perfect.

  9. #9
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,147

    Re: Returning the values of a column, in increasing value, based on one additional criteri

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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] Returning Values based on Criteria
    By Danny87` in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-05-2015, 05:45 PM
  2. [SOLVED] Sum of values based on values in different column with additional criteria
    By jimmyb555 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-15-2015, 02:31 PM
  3. Replies: 1
    Last Post: 02-06-2014, 03:00 PM
  4. Replies: 3
    Last Post: 09-06-2012, 09:07 AM
  5. [SOLVED] Returning all values based on criteria
    By SimonXL in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-13-2012, 01:19 PM
  6. Returning maximum values based on mutiple criteria
    By e1504 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-01-2012, 05:57 AM
  7. MaxIf in excel (returning max values based on a criteria)
    By Suhas Sharma in forum Excel General
    Replies: 3
    Last Post: 03-24-2011, 06:56 AM

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