View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
William Horton
 
Posts: n/a
Default List from a table

I'm not sure if you are limited to just a macro but a pivot table would do
the job.

Make the day the first row field. Make the time the 2nd row field (or a
column field, column field may be better visually). Make either the day or
the time a value field as well and change it to count (# of occurences).

This will produce unique day / time combinations and also give you a count
of the number of occurences of each.

Hope that helps.

Bill Horton

"MIchel Khennafi" wrote:

Good morning to all of you.

Has anyone faced the following situation?

I have a list that contains the following columns
- Day of the month
- Time

I would like to create a summary table using the SUMPRODUCT formula to
determine the number of calls per time period during the day in a dynamic
way.
That would mean:
- having a formula or macro that would scan the Day column and list unique
occurences of a day (for instance Day2, day1, day1, day2, day2, day2, day2,
day3... would give me a list with 3 values Day 1, Day 2, day 3
- having a formula or macro that would scan the timecolumn and list unique
occurences (7-8, 7-8, 8-9, 8-9...) would give me a list with 2 values 7-8,
8-9

Final result like
7-8 8-9
day 1 1 1

day 2 1 1

Thanks for your help in this matter