Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need to count rows between the occurence of one word - eg. "ticket".
|
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try something like the following:
Dim FirstFind As Range Dim SecondFind As Range Dim RowsBetween As Long Set FirstFind = Range("A1:A100").Find(what:="ticket", LookIn:=xlValues, _ lookat:=xlWhole, MatchCase:=False) If Not FirstFind Is Nothing Then Set SecondFind = Range("A1:A100").FindNext(after:=FirstFind) If Not SecondFind Is Nothing Then RowsBetween = SecondFind.Row - FirstFind.Row - 1 Debug.Print RowsBetween End If End If -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "SM" wrote in message ... I need to count rows between the occurence of one word - eg. "ticket". |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
if ticket is in column D:
=MATCH("ticket",OFFSET(D1,MATCH("Ticket",D:D,0),0, 10000,1),0)-1 Bob Umlas "SM" wrote in message ... I need to count rows between the occurence of one word - eg. "ticket". |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Count occurence of values | Excel Discussion (Misc queries) | |||
count how many rows a word appears in | Excel Worksheet Functions | |||
Formula to count occurence between two rows | Excel Discussion (Misc queries) | |||
VB count word occurence in variable size sheet | Excel Worksheet Functions | |||
Count the occurence of more than one condition | Excel Worksheet Functions |