+ Reply to Thread
Results 1 to 4 of 4

Function does not extract values ​​correctly

  1. #1
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Function does not extract values ​​correctly

    Hi.

    I need to understand why my formula is extracting wrong values ​​that I need to extract bseado on 2 criteria

    The criteria are "I2" and values ​​greater than zero in column "E"
    Attached Files Attached Files
    Last edited by marreco; 11-06-2012 at 05:31 AM.
    "No xadrez nem sempre a menor dist?ncia entre dois pontos ? uma linha reta" G. Kasparov.

    If your problem is solved, please say so clearly, and mark your thread as Solved: Click the Edit button on your first post in the thread, Click Go Advanced, select b from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Edit button will not appear -- ask a moderator to mark it.

  2. #2
    Registered User
    Join Date
    10-22-2012
    Location
    United States
    MS-Off Ver
    Excel 2007, 2010, 2011
    Posts
    4

    Re: Function does not extract values ​​correctly

    Marreco,

    Not sure why your formula isn't working correctly, but it seems way too advanced for what you're trying to do. See the attached with solution formulas that don't require you to use an array formula.

    Hope this helps.

    Extrac_Incorrect.xlsx

  3. #3
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: Function does not extract values ​​correctly

    See my edited sheet attached. I made a few changes:
    - I inserted a helper column in column A. Formula in A2 is: =SUM(A1,AND(D2=$J$2,F2>$K$2)) then filled down.
    - Changed the value in K2 to just 0, instead of >0 since the formula I use needs it that way
    - Changed the formula in cell K3 to: =MAX(A2:A15)
    - Changed the array formula in I4 to: =IF(ROWS(I$4:I4)>$K$3,"",VLOOKUP(ROWS(I$4:I4),$A$2:$F$15,COLUMNS($I4:I4)+COLUMNS($I4:I4),0)) then filled right and down.

    Works like a charm. Let me know if you have any questions.

    I also easily accomplished what you want with an Advanced Filter, however, Filters don't automatically update, so code works better for instant refresh of results.

    - Moo
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Re: Function does not extract values ​​correctly

    Hi.
    Moo the Dog its function coincided with the criteria, it was perfect!

    Thanks to the two who helped me!

+ 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