+ Reply to Thread
Results 1 to 4 of 4

Macro to show how many times one number appears with another number

  1. #1
    Registered User
    Join Date
    10-28-2011
    Location
    Ontario
    MS-Off Ver
    Excel 2007
    Posts
    30

    Macro to show how many times one number appears with another number

    Hello everyone, I would like a macro that asks for a number from 1 to 70 and then searches all the rows in sheet1 and lists on sheet2 column A and B how many times the other numbers appear with it. For example, suppose the number chosen is 1. On sheet2 it would list separately how many times the numbers 2 to 70 appeared with the number 1 in the same row. So in the attached file, after starting the macro and choosing the number 1, excel would look in rows 5, 6, 8, and 10 and list the numbers that appear with 1 in columns A and B as is shown in the example. As stated above, I would like the macro to search all of sheet1 not just the few rows in the attached file. Sheet1 will eventually have many rows of numbers and this will help me greatly. Thanks very much to anyone who can help me.
    Attached Files Attached Files
    Last edited by Omega71; 07-26-2012 at 10:48 AM.

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Macro to show how many times one number appears with another number

    Omega71,

    I'm pretty sure this is what you're looking for:
    Please Login or Register  to view this content.
    Last edited by tigeravatar; 07-25-2012 at 05:15 PM.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    10-28-2011
    Location
    Ontario
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: Macro to show how many times one number appears with another number

    Thank you very much, tigeravatar. The macro is exactly what I was looking for. Take care!

  4. #4
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Macro to show how many times one number appears with another number

    You're very welcome

+ 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