Ivan Grof
Ivan Grof

Reputation: 1

EXCEL - is there a formula to copy all the cells containing specific text to another column?

I have a column with dates (starting in b82), in this format 26-01-2017(DD-MM-YYYY). I want that all the cells containing "-01-" (therefore all the dates of January) to be copied in another column starting from cell b10. Is there a formula in Microsoft Excel 2016 which can solve my problem??

this is the column with the range of dates

https://i.sstatic.net/waUyN.png

and here is the column B10 under which i want that the dates of a specific month are shown (from the list of the previous screenshot), for example all january dates....then i will have a simillar table where all the february will be needed

https://i.sstatic.net/r0DOX.png

so for example for january it should take all the values with "-01-" and put them under b10..here is how it should look like:

https://i.sstatic.net/ZpoWq.png

Upvotes: 0

Views: 555

Answers (3)

Ivan Grof
Ivan Grof

Reputation: 1

this is the column with the range of dates

https://i.sstatic.net/waUyN.png

and here is the column B10 under which i want that the dates of a specific month are shown (from the list of the previous screenshot), for example all january dates....then i will have a simillar table where all the february will be needed

https://i.sstatic.net/r0DOX.png

so for example for january it should take all the values with "-01-" and put them under b10..here is how it should look like:

https://i.sstatic.net/ZpoWq.png

Upvotes: 0

M. Wise
M. Wise

Reputation: 186

Try entering this into Cell B10:

=MIN(IF(MONTH($B$82:$B$280)=1,$B$82:$B$280))

You will need to change $B$280 to the cell at the end of your date range. This is an array formula, so you will need to press CTRL + Shift + Enter for it to work. Then you will need to enter this formula into cell B11:

=MIN(IF(MONTH($B$82:$B$280)=1,IF($B$82:$B$280>B10,$B$82:$B$280)))

This is another array formula. You can then drag it down 30 rows or so until the dates begin to repeat.

This is what is should look like:

enter image description here

Upvotes: 0

user4039065
user4039065

Reputation:

My best guess is,

=INDEX(B:B, AGGREGATE(15, 7, ROW(B$82:INDEX(B:B, MATCH(1E+99, B:B)))/(MONTH(B$82:INDEX(B:B, MATCH(1E+99, B:B)))=1), ROW(1:1)))

Format as date and fill down.

Upvotes: 1

Related Questions