+ Reply to Thread
Results 1 to 9 of 9

find univocal values whit macro

  1. #1
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    find univocal values whit macro

    Hi to all,
    the attached file finds the repeated values with a formula.
    Now the file is with lots of rows and is very slow.
    can this be done with a macro?
    max_max
    Attached Files Attached Files

  2. #2
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: find univocal values whit macro

    Maybe :
    Please Login or Register  to view this content.
    1. I care dog
    2. I am a loop maniac
    3. Forum rules link : Click here
    3.33. Don't forget to mark the thread as solved, this is important

  3. #3
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: find univocal values whit macro

    Hi karedog.
    I do not understand how it works.

  4. #4
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: find univocal values whit macro

    But is the result is what you expected ?
    I use collection object to achieve the result, you may want to google for "vba collection tutorial" keywords.

  5. #5
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: find univocal values whit macro

    An explanation of how it works?

  6. #6
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: find univocal values whit macro

    1. Get data from column A-B to array a
    2. Create array output (array b)
    3. Using collection c, create unique items with its key is concatenate of data on column A and B at the same row
    4. While looping in step 3 above, add a counter on how many data with same data is found (will be used as column C value)
    5. Using collection d, create unique items with its key is data on column A only
    6. Create sub collection inside collection d (step 5 above) for each unique items on column B (so step 5 and 6 will create a "Pivot Table" liked structure, will be used as column D value)
    7. Collect all information from collection C and D to array b
    8. Put array b back into worksheet

  7. #7
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: find univocal values whit macro

    Hi Karedog
    thanks for your intervention but it seems too complicated.
    Can you create a simple macro?
    max_max

  8. #8
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: find univocal values whit macro

    If we create "simple macro" (just using array looping), it will be slower than your original worksheet function.
    The speed is gained using collection, without this object, it is useless to use VBA macro (to make speed improvement) for your case.

  9. #9
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: find univocal values whit macro

    Unfortunately translation with google translator is not so understandable.
    I do not understand the various steps.

+ 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. find univocal values
    By max_max in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-23-2017, 09:41 AM
  2. How to get values whit count and vlookup
    By J0ker91 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-16-2014, 09:25 AM
  3. Macro to find all specific values in column and replace adjacent cell values
    By dblock02 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-23-2013, 06:03 AM
  4. Need help whit a graph
    By Steinar in forum Excel General
    Replies: 4
    Last Post: 06-20-2012, 06:51 AM
  5. Can't execute a macro whit text inside procedure header's "()" *Help*
    By Timestamp in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-24-2012, 06:55 AM
  6. Sum of cells whit the same name
    By Mark J in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-23-2006, 01:00 PM
  7. Two columns whit same value
    By ceconik in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-14-2005, 05:18 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