Count the rows within the cell formula

PCRIDE

Well-known Member
Joined
Jan 20, 2008
Messages
907
Hi, I have a text field that is filled with updates for each time someone goes into the Ticket Tool to update a Ticket. When exporting the data it comes through all in one cell for that record.

Is there a formula or VB that can search the cell contents, look at the date and count the number of rows within a cell that has a date ? So this would have 6 updates .


6/3/18 - This is an update.

6/1/18 - This is an update.

5/27/18 - This is an update.

5/10/18 - This is an update.

4/15/18 - This is an update.

4/3/18 - This is an update.

Not sure I want to use Text to columns as there could be 25 rows or more extracting.
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
If your posted sample data is all in a single cell, here's a UDF you can try (below the example of its use).
Excel Workbook
DE
16/3/18 - This is an update. 6/1/18 - This is an update. 5/27/18 - This is an update. 5/10/18 - This is an update. 4/15/18 - This is an update. 4/3/18 - This is an update.6
Sheet5


Code:
Function CountIfDate(S As String) As Long
Dim V As Variant
V = Split(S, " ")
For i = LBound(V) To UBound(V)
    If IsDate(V(i)) Then CountIfDate = CountIfDate + 1
Next i
End Function
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,307
Members
452,633
Latest member
DougMo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top