+ Reply to Thread
Results 1 to 4 of 4

Extract values with condition (VBA)

  1. #1
    Registered User
    Join Date
    12-11-2014
    Location
    New York
    MS-Off Ver
    office 2010
    Posts
    71

    Extract values with condition (VBA)

    I would like to extract all values from sheet (cutsold) on column BR that have greater than 0 value on EITHER column (R) OR (T).
    The values should be listed on Sheet (Main) beginning on A4
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Extract values with condition (VBA)

    Try this ARRAY formula (not VBA)...
    A
    B
    C
    D
    1
    style color desc longdesc
    2
    AL20MP CML 20 ROUND MICRO MINK 20 ROUND MICRO MINK
    3
    AL20MP GRY 20 ROUND MICRO MINK 20 ROUND MICRO MINK
    4
    ALC33 GRY 33BOLSTER CUDDLER 33BOLSTER CUDDLER
    5
    ALC33 TAN 33BOLSTER CUDDLER 33BOLSTER CUDDLER
    6
    ALR28 GRY ROUND28 DIAMETERX8 ROUND28 DIAMETERX8
    7
    ALR28 TAN ROUND28 DIAMETERX8 ROUND28 DIAMETERX8
    8
    AM2622FB LGY bolster pet bed bolster pet bed
    9
    AM2822RF LGY RECT.BED RECT.BED
    10
    BBR110SS CML 70.5x110 Sofa Cover 70.5x110 Sofa Cover
    11
    BBR110SS MOC 70.5x110 Sofa Cover 70.5x110 Sofa Cover
    12
    BCDF18KC GRY 7x18 Round Kitty Cup 7x18 Round Kitty Cup

    A2=IFERROR(INDEX(CutSold!A:A,SMALL(IF((CutSold!$R$2:$R$2432>0)+(CutSold!$T$2:$T$2432>0),ROW(CutSold!$A$2:$A$2432)),ROWS($A$1:A1))),"")
    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.
    Copy down and then copy across as needed
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    12-11-2014
    Location
    New York
    MS-Off Ver
    office 2010
    Posts
    71

    Re: Extract values with condition (VBA)

    looks like that worked

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Extract values with condition (VBA)

    Happy to help and thanks for the feedback

+ 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. Extract substring if condition is met
    By heyJefe in forum Excel General
    Replies: 1
    Last Post: 08-30-2016, 08:38 PM
  2. Extract corresponding multiple values after the condition is met
    By akshay20 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-23-2015, 09:24 AM
  3. [SOLVED] Extract Values between two Text Strings, MULTIPLE condition
    By mchilapur in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-28-2015, 01:28 AM
  4. Extract values if condition is satisfied
    By bjnockle in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 08-26-2014, 08:39 AM
  5. [SOLVED] extract name based on condition
    By darkhangelsk in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-20-2013, 03:01 AM
  6. Using condition to extract data by matching values from 2 different Excel files
    By schellam in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-29-2005, 04:43 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