+ Reply to Thread
Results 1 to 6 of 6

Data will pair with vertical header, but not horizontal header

  1. #1
    Registered User
    Join Date
    08-24-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    3

    Data will pair with vertical header, but not horizontal header

    I'm trying to set up a spreadsheet that I can use to keep track of wins and losses between two people, the entire roster is repeated on the vertical and horizontal header. I have a VB function that will keep my list of contenders on columnA in real-time alphabetical order as I add more contenders, and the row1 header contains simple Offset() functions to mirror what's in columnA.

    Now, the actual data (number of wins) pairs fine with the columnA changes (if a new contender gets entered, the number of wins for the contenders will pair correctly), but it doesn't stay paired for row1. How can I make it so that the data pairs with both columnA and row1 changes?

    Let me know if you need more of a description! Thanks!

  2. #2
    Forum Contributor codeslizer's Avatar
    Join Date
    05-28-2013
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2003 - 2010
    Posts
    245

    Re: Data will pair with vertical header, but not horizontal header

    Yes sir, we'd like to hear more. It'll be lot easier if you could help us with a sample worksheet to explain your requirements..
    cOdEsLiZeR - Back after a long break.. Let's sLiZe some more cOdEs!!

  3. #3
    Registered User
    Join Date
    08-24-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Data will pair with vertical header, but not horizontal header

    Alright, attached is my sample worksheet. If you enter "Adam" as a contender to ColumnA, then you'll see the data (number of wins in the match-up) move down with the names in ColumnA, but they don't move to the right to stay paired with the contender names in Row1. That's the issue I'm trying to fix.
    Attached Files Attached Files

  4. #4
    Forum Contributor codeslizer's Avatar
    Join Date
    05-28-2013
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2003 - 2010
    Posts
    245

    Re: Data will pair with vertical header, but not horizontal header

    That's coz the win-data is hard-coded. I suggest if the data to be fed on some other sheet, say, with columns Challenger1, Challenger2,Winner which includes details about who had a match against whom and winner keeps the record of who won - can be name or number 1 and 0.. and that sheet with formula should be used only to provide a view like that.
    The reason is coz you basically perform a sorting on column A. So based on name's starting letter the name gets arranged in the column and later you delete the duplicates, and for corresponding change on the headers you use OFFSET. But how would the data would come to know where to go?

    As of now, with my intellectuals I can only suggest this part. Maybe other experts might have some better way to meet your requirements.

  5. #5
    Registered User
    Join Date
    08-24-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Data will pair with vertical header, but not horizontal header

    Ok, so then how could I take a list that is vertical and make it horizontal with corner dragging? Whenever I try to corner drag horizontally, the cell references increment down the columns instead of across the rows.


    EDIT: I managed to use TRANSPOSE() instead of OFFSET() to get the same list filling effect, but the win data still won't move with the top header. :/
    Last edited by ddr4lyfe; 08-25-2013 at 02:52 AM.

  6. #6
    Forum Contributor codeslizer's Avatar
    Join Date
    05-28-2013
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2003 - 2010
    Posts
    245

    Re: Data will pair with vertical header, but not horizontal header

    Hey buddy, attaching the re-worked sample file of yours based on my concept. Gives you the same result as you desired. I simply used dynamic named ranges to store the challengers and winners name which is further used in doing the COUNTIFS(). Following is the code, you can easily drag the formula to either left or right down or up, the formulae would adapt to the changes.
    Please Login or Register  to view this content.
    and I have also made changes in the change event.. following is the code..
    Please Login or Register  to view this content.
    Download the attachment and try to feed "James" in column A. You'll find some differences. I have used another sheet called "WIN-Stats" to store the WINNER's record as I mentioned earlier. Also, if the COUNTIFS() return zero, I have a conditional formatting to avoid black zero text.
    Attached Files Attached Files

+ 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. Copy data from header to header in consolidation sheet
    By Ignesh in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-12-2013, 04:10 AM
  2. Replies: 2
    Last Post: 10-13-2012, 03:30 AM
  3. matching data with header and place it below its header
    By bujji1305 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-04-2012, 02:51 AM
  4. Macro for Appending Data without Header to a database with header
    By tiang1209 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-30-2007, 04:38 AM
  5. [SOLVED] Excel - turn a page number in a header from horizontal to vertical
    By pbrookstx in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 06-03-2005, 08:05 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