+ Reply to Thread
Results 1 to 15 of 15

Finding 2 times and 3 times repeated value through VBA code support ?

  1. #1
    Registered User
    Join Date
    06-07-2021
    Location
    india
    MS-Off Ver
    2011
    Posts
    39

    Finding 2 times and 3 times repeated value through VBA code support ?

    Hi

    in my excel data having column A
    I want to extract the 2times and 3 times repeated value result to column B & C

    check the value starts with "via at xy (xxxxx)" search in entire column A ,
    in which 2 times repeated value copy to column B and 3 times repeated value copy to column c

    result should be in with bracket (xxxxx) only, not come with via at xy

    excel sheet
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,513

    Re: Finding 2 times and 3 times repeated value through VBA code support ?

    Show some . in the file
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  3. #3
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: Finding 2 times and 3 times repeated value through VBA code support ?

    Lots of the same questions.

    https://www.excelforum.com/excel-pro...need-help.html

    https://www.excelforum.com/excel-pro...que-value.html

    Please respond to your other questions first.
    Messages have been translated from Dutch to English by means of google translate.

  4. #4
    Registered User
    Join Date
    06-07-2021
    Location
    india
    MS-Off Ver
    2011
    Posts
    39

    Re: Finding 2 times and 3 times repeated value through VBA code support ?

    here attached excel sheet data2.xls, i have did manually through countif formula
    I explain here, i m requesting the vba code to do same.

    step1 using column A using begin with filter option filter out "via at xy copy to column B then removed text via at xy keeping (123456) only
    step2 added countif formula find the repeated value 2/3/4
    step3 filtered out column c extract the 2 and 3 times repeated value to column C then removed duplicate values.

    using the above steps I'm doing manually, lot of sheet like this, to getting VBA code for the above process to simply my work.
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,513

    Re: Finding 2 times and 3 times repeated value through VBA code support ?

    Code for macro
    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    06-07-2021
    Location
    india
    MS-Off Ver
    2011
    Posts
    39

    Re: Finding 2 times and 3 times repeated value through VBA code support ?

    Hi after running that above code getting error image attached please do the needful

    Attachment 736899

  7. #7
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,513

    Re: Finding 2 times and 3 times repeated value through VBA code support ?

    Attachment not opening.

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: Finding 2 times and 3 times repeated value through VBA code support ?

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    06-07-2021
    Location
    india
    MS-Off Ver
    2011
    Posts
    39

    Re: Finding 2 times and 3 times repeated value through VBA code support ?

    Attachment 736970

    error on below line
    ActiveSheet.Sort.SortFields.Add2 Key:=Range( _
    "B2:B" & UBound(M1) + 2), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
    xlSortNormal
    Attached Images Attached Images
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    06-07-2021
    Location
    india
    MS-Off Ver
    2011
    Posts
    39

    Re: Finding 2 times and 3 times repeated value through VBA code support ?

    Result come with open and closing bracket its helpful

  11. #11
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,513

    Re: Finding 2 times and 3 times repeated value through VBA code support ?

    Program running without any problem for Data2.xlsx . The code I have used is copied from thread.
    .xlsx file is up loaded. Upload .xlsm file with code. The file in which you are facing problem.

  12. #12
    Registered User
    Join Date
    06-07-2021
    Location
    india
    MS-Off Ver
    2011
    Posts
    39

    Re: Finding 2 times and 3 times repeated value through VBA code support ?

    i'm downloaded data2 ans.xlsm‎ that excel problem.

  13. #13
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,513

    Re: Finding 2 times and 3 times repeated value through VBA code support ?

    Where is the file.

  14. #14
    Registered User
    Join Date
    06-07-2021
    Location
    india
    MS-Off Ver
    2011
    Posts
    39

    Re: Finding 2 times and 3 times repeated value through VBA code support ?

    Attachment 737204 from the above post of 06-14-2021, 07:09 PM

  15. #15
    Registered User
    Join Date
    06-07-2021
    Location
    india
    MS-Off Ver
    2011
    Posts
    39

    Re: Finding 2 times and 3 times repeated value through VBA code support ?

    Quote Originally Posted by jindon View Post
    Please Login or Register  to view this content.
    Result come with open and closing bracket its helpful

+ 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. [SOLVED] Repeated words: remove duplicates, display word along with the number of times repeated
    By number9 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-24-2019, 03:32 PM
  2. [SOLVED] IF statement repeated multiple times
    By AdamThompson569 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-14-2018, 11:47 AM
  3. No of times names to be repeated
    By goodboy in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-02-2016, 10:14 AM
  4. Replies: 4
    Last Post: 08-22-2016, 10:42 PM
  5. Identify accounts repeated more than 3 times
    By Pbb1008 in forum Excel - New Users/Basics
    Replies: 6
    Last Post: 06-20-2016, 11:15 PM
  6. [SOLVED] Number of times same text is repeated
    By fedfed in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-09-2014, 07:43 AM
  7. If a search term can be found 1 time, 2 times 3 times 4 times 5 times
    By excelcandy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-10-2013, 09:57 PM

Tags for this Thread

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