+ Reply to Thread
Results 1 to 11 of 11

Index data that match multiple conditions

  1. #1
    Registered User
    Join Date
    06-22-2009
    Location
    Kuwait
    MS-Off Ver
    Excel 2010
    Posts
    59

    Index data that match multiple conditions

    Another request for help, hope the below example is clear to understand and makes sense.
    Thanks in advance.
    Sheet1
    Column-A Column-B
    1 (Using formula: =COUNTIF($B$2:B2,B2) B-001
    1 B-002
    2 B-001
    1 B-003
    2 B-003

    Sheet2
    Column-A Column-B
    B-001 1
    2
    Each row in column-B should show the number in sequence if match the data column B (Sheet1) with column A (Sheet2) . Should not list 1,1,2,1,2 as Sheet1, column-A.
    Last edited by razaas; 12-30-2009 at 04:53 AM.

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

    Re: Sorting data

    I didn't quite understand what you looking for but try this:

    =IF(ISNA(MATCH(B1;Sheet1!$C:$C;0));"No match";ROWS($A$1:A1))

    (replace ; with , if needed).

    Also, instead of "No match" you can put empty cell "" or anything else like "anything else"

    This formula will give you:

    Please Login or Register  to view this content.
    Last edited by zbor; 12-29-2009 at 02:55 AM.

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

    Re: Sorting data

    Or perhapes this:

    =IF(ISNA(MATCH(B2;Sheet1!$C:$C;0));"No match";COUNT($C$1:C1)+1)

    This formula you write in C2 (not in C1) and C1 must be =IF(ISNA(MATCH(B1;Sheet1!$C:$C;0));"No match";1)

    This formula will give you:

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    06-22-2009
    Location
    Kuwait
    MS-Off Ver
    Excel 2010
    Posts
    59

    Re: Sorting data

    Thanks so much zbor, i read your same code in another thread and tried it, what i am looking for is, my list in column-B (Sheet2) should show the numbers in sequence from column-B (Sheet1) only those match with column-A (Sheet2). I guess INDEX function combined with MATCH function may do the trick, i am not that knowledgable to figure out the correct syntax. Hope this makes sense for you. Appreciate your response. Thanks

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

    Re: Sorting data

    Can you upload example with desired output?

  6. #6
    Registered User
    Join Date
    06-22-2009
    Location
    Kuwait
    MS-Off Ver
    Excel 2010
    Posts
    59

    Re: Sorting data

    File uploaded, thanks
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    06-22-2009
    Location
    Kuwait
    MS-Off Ver
    Excel 2010
    Posts
    59

    Sorting data

    Waiting for someones help, thanks to all
    Last edited by razaas; 12-30-2009 at 03:25 AM.

  8. #8
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Provide suitable formula

    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 on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

  9. #9
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671

    Re: Sorting data

    It's a combination of
    NAMES
    INDEX
    MATCH.

    See the attachement.
    Last edited by teylyn; 12-30-2009 at 04:12 AM.
    Looking for great solutions but hate waiting?
    Seach this Forum through Google

    www.Google.com
    (e.g. +multiple +IF site:excelforum.com/excel-general/ )

    www.Google.com
    (e.g. +fill +combobox site:excelforum.com/excel-programming/ )

    Ave,
    Ricardo

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

    Re: Sorting data

    Try this:

    Attachment 61334

    Edit: I didn't check rwgrietveld solution but since I've already made it I've upload it
    Last edited by teylyn; 12-30-2009 at 04:17 AM.

  11. #11
    Registered User
    Join Date
    06-22-2009
    Location
    Kuwait
    MS-Off Ver
    Excel 2010
    Posts
    59

    Re: Sorting data

    zbor,
    thanks so much, it is a great help and i appreciate it very much. thanks again n again
    Please let me know if you have any improvement suggestions on the workbook.

+ 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