View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
oercim oercim is offline
external usenet poster
 
Posts: 51
Default modified pivot table using a macro

Hello,

I need help. I need to create a table using a macro which resembles like pivot table. For example
let , the data is like below on sheet1

A B
--- ----
jane a
jane a
jane b
john a
john b
john b
john d

My aim to create a table that counts the column B according to column A. For example for this sheet, I want to create a table as below:

a b c d e
--------------------------------------------------------
jane 2 1 0 0 0
-------------------------------------------------------
john 1 2 0 1 0


As can be seen from the second table, "c" and "e" does not exist in sheet1, however I want them to appear the resulted table. Let a,b,c,d and e are listed in sheet2 as below:

A
----
a
b
c
d
e

How can I create the resulted table, using the data in sheet1 and sheet2. I will be very glad for any recomendation. Thanks a lot.