+ Reply to Thread
Results 1 to 3 of 3

Reducing data into a new table

  1. #1
    Registered User
    Join Date
    07-30-2009
    Location
    Pittsburgh
    MS-Off Ver
    Excel 2007
    Posts
    1

    Reducing data into a new table

    I have a table that captures bargaining data between a & b. In a nutshell, "a" is looking to buy low, and "b" is looking to sell high. The table looks like this:

    (sorry for the poor formatting...it looked good in the editor!)
    Group,Rd, From, To, Offer
    1 1 a b 3
    1 1 b a 5
    1 1 a b 4
    1 1 b a 5
    1 2 b a 6
    1 2 a b 2
    1 2 a b 3
    2 1 b a 5
    2 1 a b 2
    2 1 b a 4
    .
    .
    (goes on for 8500 rows).

    I need to simplify the above into a table like this:

    Group,Rd, Initiated by A, A's 1st offer
    1 1 1 3
    1 2 0 2
    2 1 0 2

    Any advice on how I could do this in VBA?

    I was thinking that one way to get the "Initiated by A" information was to compare the row at which "a" first occurs for a particular group in that specific round with the row that "b" first occurs. If the former is smaller than the latter, then a "1" is input into the "Initiated by A" column. The problem is, I don't know how to implement this comparison since "a" and "b" could go back and forth any number of times. Is there an easier way to get this done? Same problem with the comparison with the "A's 1st offer" column". Sigh...

    Help would be greatly appreciated!
    -KG

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    re: Reducing data into a new table

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Reducing data into a new table

    I have edited your title this time, make sure that you read & follow thw rules in future.

    I suggest you add a sample workbook with a before & after example

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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