Count the rows within the cell formula

PCRIDE

Well-known Member
Joined
Jan 20, 2008
Messages
902
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

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
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,216,106
Messages
6,128,863
Members
449,473
Latest member
soumyahalder4

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