Posts by mythu

    I would like to merging data that contains repeating ID's, specifically in cases where a single ID appears multiple times with unique DOS (Date of Service) entries. My objective is to consolidate the notes associated with each unique DOS entry into a single cell, similar to the example I provided earlier.


    So all notes and thier respective dates will be merged for each unique ID


    IDConcatenate Result
    147/25/2008: (Chapter 7 is more complicated) 8/23/2022: (Management is decided to leave) 9/2/2021: (Nothing is more curious)

    Thank you its working fine but there is one problem that is it should concatenate the Dates and Notes for unique ID. Right now code is concatenating based on ID's and Dates:


    For Example for Id# 14 it should concatenate like this in ascending order

    ID Concatenate Result
    14 7/25/2008: (Chapter 7 is more complicated) 8/23/2022: (Management is decided to leave) 9/2/2021: (Nothing is more curious)

    One more favor is it possible to convert the result into below format with dates and brackets


    IDNote
    005-31-2018: (more better)
    102-28-2006: (Look at the staidum next to abal road)
    303-08-2010: (Careem is away and will be reached late)
    712-26-2007: (the code is running but slow)
    1407-25-2008: (Chapter 7 is more complicated) 09-02-2021: (Nothing is more curious) 08-23-2022: (Management is decided to leave)
    1611-03-2006: (None) 12-22-2006: (1 2 3 4 5)
    2506-23-2007: (1 and 2 and 3 and 4 and 5 and 6 and A B C)
    2612-09-2004: (Nothing special for the day)
    3612-04-2009: (John woh) 07-23-2010: (Listen) 07-29-2010: (Kim Antonio)
    3709-22-2006: (1 2 3) 12-27-2006: (85426351) 06-26-2007: (A1 B2 C3 D4) 07-11-2007: (Lines) 09-19-2007: (Products)

    I have data in Sheet1 with 4 columns: ID, Sequence, DOS, and Note.


    My code creates a duplicate sheet and removes columns B and D, keeping only columns A and C. Then, it removes any duplicate entries based on the values in columns A and C.


    Next, the code looks up data from Sheet1 using columns A and C as the key, and concatenates the values in column D. It then pastes this data into column C of the duplicate sheet.


    I would like to add a few more lines of code to include column 2, Sequence, so that the data is copied based on ascending order of sequence values. However, I'm having difficulty implementing this and would appreciate any assistance.



    There are multiple Workbooks in a folder and have similar column which Header name is "Name" but in each file column position is chnaged.


    I want to search that header in 1st row of each workbook if finds then copy that entire column from multiple workbooks availble in Folder and Paste Unique result (values) into an open workbook where from code is being run.


    There is one more thing that i want to extract multiple column by Header please add Array method so i can add more column name. I have attached 3 workbooks and result file


    I would appreciate your help.


    Yes you're right COUNTIF is more faster than VBA but that time COUNTIF is not giving an accurate answer. You can try on attached file.


    First i used COUNTIF then SUMPRODUCT since countif answers were wrong then went to sumproduct which was perfect but its processing were slow over large datasets.


    Then found above code. I would appreciate if you could help to modify the above code.

    I am using CountIF VBA version which gives me ease due to its fast calculation while working with the large datasets. My Data has text values as well as numerice values so it is basicaly a combination of different values.


    I just want to count the number of repeated values but my function is giving wrong result as you can see in attached file.


    I would appreciate if someoene can look into it and make it more efficent in terms of:


    Accurate count for repeated values

    Code Speed

    and the last thing is i want to use this code in Personal.XLSB so i can recall it using shortkey.


    I hope to get help. Thanks