ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Listing Occurences of a date (https://www.excelbanter.com/excel-programming/411323-listing-occurences-date.html)

Archengineer

Listing Occurences of a date
 
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.



Jim Cone[_2_]

Listing Occurences of a date
 
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"

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.



Archengineer

Listing Occurences of a date
 
That would be ok if I needed one project number per cell, but I need to group
multiple project numbers in a single cell.



"Jim Cone" wrote:

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"

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.




Jim Cone[_2_]

Listing Occurences of a date
 
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.



"Jim Cone" wrote:
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"

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.




All times are GMT +1. The time now is 09:31 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com