Listing Occurences of a date

  • Thread starter Thread starter Archengineer
  • Start date Start date
A

Archengineer

I have two columns of data. The first column contains five-digit "project"
numbers, the second column contains a starting date (m/d/y) associated with
the project. The numbers and dates are random.

In a third column I have generated a list of dates that are in sequential
order starting with 01/01/2000. To the right of each of these sequential
date cells I would like a cell to list all of the project numbers that
started on that date. There could be up to 12 projects starting on any one
date. I'm not sure how to accomplish this....any help would be appreciated.
 
Instead of using code, what about just auto filtering by the start date in the second column?
--
Jim Cone
Portland, Oregon USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"Archengineer"
<[email protected]>
wrote in message
I have two columns of data. The first column contains five-digit "project"
numbers, the second column contains a starting date (m/d/y) associated with
the project. The numbers and dates are random.

In a third column I have generated a list of dates that are in sequential
order starting with 01/01/2000. To the right of each of these sequential
date cells I would like a cell to list all of the project numbers that
started on that date. There could be up to 12 projects starting on any one
date. I'm not sure how to accomplish this....any help would be appreciated.
 
That would be ok if I needed one project number per cell, but I need to group
multiple project numbers in a single cell.
 
Select the dates in the third column and run the code below.
(try it on a copy of the sheet) <g>
'--
Sub AllInOne()
Dim rng As Range
Dim rCell As Range
Dim dCell As Range

Set rng = Selection
For Each rCell In rng.Cells
For Each dCell In rng.Offset(0, -1).Cells
If rCell.Value = dCell.Value Then
rCell(1, 2).Value = rCell(1, 2).Value & " " & dCell(1, 0).Value
End If
Next
Next
End Sub
'--
Jim Cone
Portland, Oregon USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"Archengineer"
wrote in message
That would be ok if I needed one project number per cell, but I need to group
multiple project numbers in a single cell.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top