+ Reply to Thread
Results 1 to 4 of 4

macro to condense rows of data to single row

  1. #1
    Registered User
    Join Date
    08-06-2009
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    3

    macro to condense rows of data to single row

    Hello,

    I need some help with writing a macro in excel 2007.
    This is my case:

    col A col B Col C
    1 2 100
    2 3 100
    3 4 200
    4 5 200

    My result should be:

    col A col B Col C
    1 3 100
    3 5 200

    Assuming the numbers are in 3 columns, my macro should traverse the loop, condense as well as delete the redundant rows. Can anyone please help me with this.I apprectiate your help. Thanks in advance.
    Last edited by lax; 08-06-2009 at 09:48 AM.

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: macro to condense rows of data to single row

    Thanks for taking the time to read and comply with the rule .

  3. #3
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: macro to condense rows of data to single row

    What is the logic behind this?

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: macro to condense rows of data to single row

    Quote Originally Posted by StephenR View Post
    What is the logic behind this?
    Col A is the Min "A" value for the matching column C values
    Col B is the Max "B" value for the matching column C values
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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