+ Reply to Thread
Results 1 to 6 of 6

Copy common number present in multiple rows

  1. #1
    Registered User
    Join Date
    06-18-2014
    Location
    India
    MS-Off Ver
    2007
    Posts
    35

    Copy common number present in multiple rows

    Hi all,

    I am new to vba.
    I need vba for following.
    A & B column contains data. Each row in both column has one common number in either A column or B column.
    I want to copy that number.

    Example

    A B
    11 56

    73 11

    97 11

    11 39

    In above, 11 is common number. I want that number to be copied.
    Please help.

    Thanks in Advance

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Copy common number present in multiple rows

    No need for VBA use MODE formula.
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

  3. #3
    Registered User
    Join Date
    06-18-2014
    Location
    India
    MS-Off Ver
    2007
    Posts
    35

    Re: Copy common number present in multiple rows

    Hi nathansav,

    Thanks a lot. It worked perfectly.

  4. #4
    Registered User
    Join Date
    06-18-2014
    Location
    India
    MS-Off Ver
    2007
    Posts
    35

    Re: Copy common number present in multiple rows

    Hi nathansav,

    Thanks a lot. It worked perfectly.

  5. #5
    Registered User
    Join Date
    06-18-2014
    Location
    India
    MS-Off Ver
    2007
    Posts
    35

    Re: Copy common number present in multiple rows

    Hi nathansav,

    The mode formula gives single common number present in all the rows.
    What should I do, if I want another number which may also be common in some rows.
    I mean next highest common number.

    thanks

  6. #6
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Copy common number present in multiple rows

    You'll need to use SMALL and COUNTIF in an array formula, i'd look at that. I dont have time at the minute.

+ 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. Replies: 1
    Last Post: 08-14-2013, 10:41 PM
  2. [SOLVED] Auto Hiding rows based on range/data present or not present.
    By raze in forum Excel Programming / VBA / Macros
    Replies: 27
    Last Post: 02-10-2013, 11:27 AM
  3. [SOLVED] Insert Multiple Rows Based Off Number in Cell and Copy Data From Above New Rows
    By tstell1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-02-2012, 04:15 PM
  4. Replies: 0
    Last Post: 08-30-2010, 10:30 PM
  5. Copy For Cell Values Present and not Formulas Present
    By bdb1974 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-11-2009, 12:10 PM

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