+ Reply to Thread
Results 1 to 2 of 2

Consolidating data from multiple rows in one row

  1. #1
    Registered User
    Join Date
    03-03-2009
    Location
    Warsaw, Poland
    MS-Off Ver
    Excel 2003
    Posts
    1

    Consolidating data from multiple rows in one row

    Hello,

    Help urgently needed

    I have a database in Excel 2003 containing around 20k rows. The columns are:

    client
    type of client
    revenue a
    revenue b
    revenue c
    revenue d
    revenue e

    Since the table was merged from different sources, the same client (it's a unique ID) is listed in multiple rows, each row is used for specific type of revenue, e.g.

    client_ABC corporate revenue_a_value 0 0 0 0
    client_ABC corporate 0 revenue_b_value 0 0 0
    ...
    ...
    ...
    client XYZ SME revenue_a_value 0 0 0 0
    client XYZ SME 0 revenue_b_value 0 0 0
    ...

    and so on.

    What I need is a table where one client is listed in only one row and revenues of all types are listed in this row, in their respective columns. If revenue a is >0, it's listed in column C, if revenue b is > 0, it's listed in column D in the same row, and so forth. Basically, one row per client containing all the revenues, not one row per type of revenue per client. I tried to write a macro for that but since I'm a VBA beginner, it's not as easy as it seems.

    Thanks in advance.

    d

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Consolidating data from multiple rows in one row

    Hi,

    you should explore pivot tables. They are used to summarize data and display it. It's easy to set up and can be customised.

    Look it up in the excel help files or here:

    http://peltiertech.com/Excel/Pivots/pivotstart.htm

    hope that gets you started.

+ 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