+ Reply to Thread
Results 1 to 21 of 21

Duplicating Entries

  1. #1
    Registered User
    Join Date
    01-06-2013
    Location
    San Diego
    MS-Off Ver
    Excel 2007
    Posts
    11

    Duplicating Entries

    I'm trying to make a simple worksheet that shows who has played who in a league and the number of times they have played. Across the top column and down the left column are the player names. When I enter the number of times Player X has played Player Y, that value should also show up in the number of times Player Y has played player X.

    Mike
    Attached Files Attached Files
    Last edited by eznoh; 01-06-2013 at 06:36 PM.

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Duplicating Entries

    Hi Mike,

    Sorry but not following here. Let's just use Plyr 2 (A3) as an example.

    If you put a 5 in B3 which means Plyr 2 (A3) played Plyr 1 (B1) 5 times, it is a matrix so it is reversed at the same time.

    Some more understanding please?
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    01-06-2013
    Location
    San Diego
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Duplicating Entries

    Yes, so a 5 would also go in C2 when I enter the 5 in B3 or vice-versa.

    Mike

    Moderator's Note: As per Forum Rule #12, please don't quote whole posts unless necessary…it's just clutter...Thanks.
    Last edited by jeffreybrown; 01-06-2013 at 10:31 AM.

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Duplicating Entries

    Hi Mike,

    I don't think you will get this done with any formula. Sounds like VBA is required.

    Is this the direction you want to go and how big is this table in the real workbook?

  5. #5
    Registered User
    Join Date
    01-06-2013
    Location
    San Diego
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Duplicating Entries

    The table would be 25 x 25.

    Moderator's Note: As per Forum Rule #12, please don't quote whole posts unless necessary…it's just clutter...Thanks.

  6. #6
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Duplicating Entries

    Try this attachment with VBA behind worksheet #1.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    01-06-2013
    Location
    San Diego
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Duplicating Entries

    Quote Originally Posted by jeffreybrown View Post
    Try this attachment with VBA behind worksheet #1.
    Looks like that works, how can I extend it to 25 x 25?

  8. #8
    Registered User
    Join Date
    01-06-2013
    Location
    San Diego
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Duplicating Entries

    I see how the macro works but it looks like I'll have to make dozens of IF blocks, is there a way to make with variables?

    Mike

  9. #9
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,596

    Re: Duplicating Entries

    Does this helps:
    Please Login or Register  to view this content.

  10. #10
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Duplicating Entries

    As an option
    Please Login or Register  to view this content.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  11. #11
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Duplicating Entries

    @zbor & John,

    Both of these options are great, thanks.

    @Mike,

    Here is a file with both options.
    Attached Files Attached Files
    Last edited by jeffreybrown; 01-06-2013 at 04:38 PM.

  12. #12
    Registered User
    Join Date
    01-06-2013
    Location
    San Diego
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Duplicating Entries

    Thanks to everyone for your help!

  13. #13
    Registered User
    Join Date
    01-06-2013
    Location
    San Diego
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Duplicating Entries

    The worksheet would not work when I loaded another spreadsheet which records the scores.

    Mike

  14. #14
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Duplicating Entries

    Quote Originally Posted by eznoh View Post
    The worksheet would not work when I loaded another spreadsheet which records the scores.
    Hard to say without seeing the offening workbook, but the macro is a worksheet change event so much be placed in the code for the sheet and the ranges need to be updated if moved from the original.

  15. #15
    Registered User
    Join Date
    01-06-2013
    Location
    San Diego
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Duplicating Entries

    If I open the two different spreadsheets with 2 separate instances of Excel, why should the macros interfere with each other?

  16. #16
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Duplicating Entries

    I can't see why they would...

  17. #17
    Registered User
    Join Date
    01-06-2013
    Location
    San Diego
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Duplicating Entries

    Here is the other spreadsheet
    Attached Files Attached Files

  18. #18
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Duplicating Entries

    Quote Originally Posted by eznoh View Post
    If I open the two different spreadsheets with 2 separate instances of Excel, why should the macros interfere with each other?
    You might want to give some explanation here.

    I don't see a macro in here that matches what has been done in this thread.

    Is this question/query different than the rest of this thread?

  19. #19
    Registered User
    Join Date
    01-06-2013
    Location
    San Diego
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Duplicating Entries

    Sorry,attached is what was given to me here. By itself it works but when I run it with the previously attached spreadsheet, it works for a short time then stops working.
    Attached Files Attached Files

  20. #20
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Duplicating Entries

    Jeff's point is...the code you reference
    what was given to me here
    is NOT in your most recent upload.
    I don't see a macro in here that matches what has been done in this thread.
    So, answer his question
    Is this question/query different than the rest of this thread?
    Additionally I don't see a worksheet that resembles what we've been addressing. What worksheet are you trying to run the code against?

  21. #21
    Registered User
    Join Date
    01-06-2013
    Location
    San Diego
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Duplicating Entries

    Quote Originally Posted by jeffreybrown View Post
    @zbor & John,

    Both of these options are great, thanks.

    @Mike,

    Here is a file with both options.
    Just to finish up this thread, this was the file I ended up using. It had 2 worksheets, I deleted one and it seems to work fine now. Thanks to everyone who helped me with this, I can't believe how much time you put into it, I appreciate it very much!

    Mike

+ 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