+ Reply to Thread
Results 1 to 5 of 5

Display the value not duplicate

Hybrid View

emina002 Display the value not... 06-10-2011, 06:55 PM
MarvinP Re: Display the value not... 06-10-2011, 09:11 PM
Haseeb Avarakkan Re: Display the value not... 06-10-2011, 10:29 PM
emina002 Re: Display the value not... 06-11-2011, 05:05 AM
emina002 Re: Display the value not... 06-13-2011, 12:45 AM
  1. #1
    Forum Contributor
    Join Date
    05-16-2011
    Location
    Philippines
    MS-Off Ver
    Excel 365/Excel 2016
    Posts
    315

    Display the value not duplicate

    Hi somehow I am new and seems can't explain my problem very well,not well good in Excel VBA. First, please see attachment for the sample of my problem.Regarding of how can I filter or display the value on one sheet to another,Its regarding of distinct or duplicate value.On Sheet1 Column A I have ACC# and will look for exact value on Sheet2 on Column C and returns the result on Sheet1 Column C,D with Alt Acc # and Desc 2.

    I highlight my problem with green.Whenever I run the code looking for the value on Sheet2 it always return the last value of Desc2 and Alt Acc #. What I need for example if I look for the "99991001" sheet 1 returns the 3 unique Desc2,in short no duplicates.Please I just need your help.Thanks for helping me.
    Attached Files Attached Files
    Last edited by emina002; 06-10-2011 at 07:08 PM. Reason: No attachment

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,379

    Re: Display the value not duplicate

    Hi emina002,

    See the attached with 2 helper columns on each sheet.
    The first helper column counts the number of the account numbers in each table.
    The second helper uses the account number and appends the count above to create a unique index.
    Then it is a simple VLookup problem.

    hope this helps. Some smart gurus can do this using Array Formulas or Index Match formulas but by moving the Helper2 column to column A, you can use VLookup.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    365
    Posts
    2,243

    Re: Display the value not duplicate

    Hello emina002, welcome to the forum!

    If you can sort sheet2 Acc# in ascending order, can use INDEX/MATCH.

    Sheet1 C2, copy down & across.

    =INDEX(Sheet2!A:A,MATCH($A2,Sheet2!$C:$C,0)+MAX(0,COUNTIF($A$2:$A2,$A2)-1))

    If you can't sort the Sheet2 data, try,

    Sheet2 C2,

    =IFERROR(INDEX(Sheet2!A:A,SMALL(IF(Sheet2!$C$2:$C$11=$A2,ROW(Sheet2!$C$2:$C$11)),COUNTIF($A$2:$A2,$A2))),"")

    This is Array formula, must hit CONTROL+SHIFT+ENTER, not just ENTER. then copy down & across
    Attached Files Attached Files
    Last edited by Haseeb Avarakkan; 06-10-2011 at 10:32 PM.
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  4. #4
    Forum Contributor
    Join Date
    05-16-2011
    Location
    Philippines
    MS-Off Ver
    Excel 365/Excel 2016
    Posts
    315

    Re: Display the value not duplicate

    wow thanks for the BIG help I really appreciate it.I will try this and inform you if its working or not..thanks..

  5. #5
    Forum Contributor
    Join Date
    05-16-2011
    Location
    Philippines
    MS-Off Ver
    Excel 365/Excel 2016
    Posts
    315

    Re: Display the value not duplicate

    it works now..for the suggestion

+ 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