+ Reply to Thread
Results 1 to 27 of 27

Extract table with criteria

  1. #1
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    698

    Extract table with criteria

    Hi friends,

    I have below excel file, in this file I have USD statement of account table. But cumming all details. Please check and advice me formula changes.

    Please check Row 24, 25. I want 24 only, I mention it in formula, but 25th row comming, AND Row 7 not coming in Statement of account table(USD entry).

    Thank you friends.
    Attached Files Attached Files
    Last edited by zbor; 01-09-2017 at 06:08 AM.

  2. #2
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    698

    Re: Formula working wrong, I can't identify why.

    If existing formula is wrong, then please provide me new formula for Statement of Account table

  3. #3
    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
    52,939

    Re: Formula working wrong, I can't identify why.

    I have no idea what you are trying to do here

    I get this part...
    SMALL(IF(($I$5:$I$7<>0)*($B$5:$B$7>=$G$15)*($B$5:$B$7<=$G$16)*($C$5:$C$7=$A$15), ROW($A$5:$A$7)-ROW($A$5)+1, (IF(($H$5:$H$7<>0)*($B$5:$B$7>=$G$15)*($B$5:$B$7<=$G$16)*($C$5:$C$7=$A$15), ROW($A$5:$A$7)-ROW($A$5)+1))), ROWS($A$23:$A23))
    and I get this part...
    SMALL(IF(($I$5:$I$7<>0)*($B$5:$B$7>=$G$15)*($B$5:$B$7<=$G$16)*($C$5:$C$7=$A$15), ROW($A$5:$A$7)-ROW($A$5)+1, (IF(($H$5:$H$7<>0)*($B$5:$B$7>=$G$15)*($B$5:$B$7<=$G$16)*($C$5:$C$7=$A$15), ROW($A$5:$A$7)-ROW($A$5)+1))), ROWS($A$23:$A23))
    but what are you trying to do with the middle part?
    SMALL(IF(($I$5:$I$7<>0)*($B$5:$B$7>=$G$15)*($B$5:$B$7<=$G$16)*($C$5:$C$7=$A$15), ROW($A$5:$A$7)-ROW($A$5)+1, (IF(($H$5:$H$7<>0)*($B$5:$B$7>=$G$15)*($B$5:$B$7<=$G$16)*($C$5:$C$7=$A$15), ROW($A$5:$A$7)-ROW($A$5)+1))), ROWS($A$23:$A23))

    The general syntax for that method is...
    index(range to return, small(if(range=criteria,row(range)),rows($A$1:A1)))
    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

  4. #4
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    698

    Re: Formula working wrong, I can't identify why.

    actually below formula i am using

    Please Login or Register  to view this content.

    If H (OR) I columns have values then true other wise false.
    Attached Files Attached Files
    Last edited by rajeshn_in; 01-09-2017 at 04:02 AM.

  5. #5
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    698

    Re: Formula working wrong, I can't identify why.

    Main thing is H OR I columns have any values then cell value come other wise no need. Have some date (B) and company name(C) conditions.

    IFERROR(INDEX($A$5:$N$7, SMALL(IF(AND(OR(($I$5:$I$7)<>0, ($H$5:$H$7)<>0), ($B$5:$B$7>=$G$15), ($B$5:$B$7<=$G$16), ($C$5:$C$7=$A$15)), ROW($A$5:$A$7)-ROW($A$5)+1, ROW($A$5:$A$7)-ROW($A$5)+1), ROWS($A$23:$A24)), MATCH(D$19, $A$2:$N$2, 0)), "")
    Last edited by rajeshn_in; 01-09-2017 at 04:02 AM.

  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,209

    Re: Formula working wrong, I can't identify why.

    Try

    =IFERROR(INDEX($A$5:$N$7, SMALL(IF(((I$5:$I$7<>0)+( $H$5:$H$7<>0))* ($B$5:$B$7>=$G$15)* ($B$5:$B$7<=$G$16)* ($C$5:$C$7=$A$15), ROW($A$5:$A$7)-ROW($A$5)+1, ""), ROWS($A$5:$A5)), MATCH(D$19, $A$2:$N$2, 0)+2), "")

    Enter with Ctrl+Shift+Enter


    "+" are OR conditions

    "*" are AND Conditions
    Last edited by JohnTopley; 01-09-2017 at 06:06 AM.

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

    Re: Formula working wrong, I can't identify why.

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title go to your first post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

  8. #8
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    698

    Re: Formula working wrong, I can't identify why.

    Hi Zbor,

    Please allow my post for further replies. I have changed Heading.

  9. #9
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    698

    Re: Formula working wrong, I can't identify why.

    Hi John Topley,

    Same result coming...... No Change.

  10. #10
    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,209

    Re: Extract table with criteria

    I think the test is wrong but not sure what you want.

  11. #11
    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,209

    Re: Extract table with criteria

    See attached

    In A24

    =IFERROR(INDEX($B$5:$B$7, SMALL(IF((($I$5:$I$7<>0)+($H$5:$H$7<>0))*($B$5:$B$7>=$G$15)* ($B$5:$B$7<=$G$16)* ($C$5:$C$7=$A$15), ROW($A$5:$A$7)-ROW($A$5)+1,""),ROWS($A$5:A5))), "")

    Enter with Ctrl+Shift+Enter

    Highlighted range changed for other data
    Attached Files Attached Files

  12. #12
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    698

    Re: Extract table with criteria

    Yes, this is what I want. Thank you very much John Topley, Thank you very much

  13. #13
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    698

    Re: Extract table with criteria

    Hi John,

    I applied as your below formula, but values are not coming what we mentioned in formula.....
    =IFERROR(INDEX($B$5:$B$7, SMALL(IF((($I$5:$I$7<>0)+($H$5:$H$7<>0))*($B$5:$B$7>=$G$15)* ($B$5:$B$7<=$G$16)* ($C$5:$C$7=$A$15), ROW($A$5:$A$7)-ROW($A$5)+1,""),ROWS($A$5:A5))), "")

    Please see attachment , Statement of account - USD table row 20 no need, because its SGD entry,
    and same Statement of account - SGD table row 19 no need, because its USD entry

    please see and advice me ......
    Attached Files Attached Files

  14. #14
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    698

    Re: Extract table with criteria

    Hi friends,

    Can any one please check this issue........

  15. #15
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Extract table with criteria

    a19
    Please Login or Register  to view this content.
    try this and copy across and made necessary changes as per your need
    please see attached file
    Attached Files Attached Files
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  16. #16
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    698

    Re: Extract table with criteria

    Thank you for your replay nflsales.

    7 Row not coming in statement of account table, plz check attachment
    Attached Files Attached Files

  17. #17
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Extract table with criteria

    sorry did not cross check $ sing was missed and rows function missed
    see the attached file
    Attached Files Attached Files

  18. #18
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    698

    Re: Extract table with criteria

    Hi Friends,

    Any suggestions.

  19. #19
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Extract table with criteria

    Quote Originally Posted by rajeshn_in View Post
    Hi Friends,

    Any suggestions.
    attach file not working?

  20. #20
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    698

    Re: Extract table with criteria

    Actually some bank entries don't have A column. So, we can't use Column A in formula. Please see attachment for better understanding.

    Thank you.
    Attached Files Attached Files

  21. #21
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Extract table with criteria

    Quote Originally Posted by rajeshn_in View Post
    Actually some bank entries don't have A column. So, we can't use Column A in formula. Please see attachment for better understanding.

    Thank you.
    in that case which columns to look

  22. #22
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    698

    Re: Extract table with criteria

    H, I for USD,

    N, O for SGD

  23. #23
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    698

    Re: Extract table with criteria

    H, I for USD,

    N, O for SGD

    Two bank entries updated in above file.

    Thank you...

  24. #24
    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,209

    Re: Extract table with criteria

    For SGD

    in I19
    Please Login or Register  to view this content.
    Enter with Ctrl+Shift+Enter

    Copy across and change range as required

    You should have been able to work this out for yourself

    Use previous formula given for USD
    Attached Files Attached Files

  25. #25
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Extract table with criteria

    Quote Originally Posted by rajeshn_in View Post
    h, i for usd,

    n, o for sgd

    two bank entries updated in above file.

    Thank you...
    see the attached file little bit modified formula
    Attached Files Attached Files

  26. #26
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    698

    Re: Extract table with criteria

    Thank you friend, thank you very much.

  27. #27
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    698

    Re: Extract table with criteria

    Thank you John, thank you very much.

+ 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. Vlookup not working, where am I going wrong?
    By forestavekids in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-08-2016, 07:02 PM
  2. [SOLVED] Formula stopped working - what's wrong ?
    By Lukael in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-12-2016, 01:13 PM
  3. [SOLVED] Identify missing and wrong entries
    By keshav140 in forum Excel General
    Replies: 3
    Last Post: 09-05-2014, 06:55 AM
  4. [SOLVED] SUMPRODUCT Formula is not working and I cant see what is wrong with it
    By necht_angel in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 11-19-2013, 10:31 AM
  5. VLOOKUP not working:What am I doing wrong?
    By prefcomm in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-05-2009, 05:12 PM
  6. Replies: 7
    Last Post: 02-10-2009, 10:44 AM
  7. Working on the wrong sheet
    By Craigm in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-24-2005, 07:37 AM

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