For instance, let's say the range is B3:B100, and the number 1 will
occasionally show up 3x's or 5x's and then occasionally 7x's with blank cells
and between each of the sets. I need it to display somewhere at the top of
the spreadsheet when the number 1 has shown up seven consecutive times. Most
importantly, I need it to start the count over again once it runs across a
blank cell.
Any help would greatly be appreciated!
~John~
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
dguil...@austin.rr.com
"John67" <Joh...@discussions.microsoft.com> wrote in message
news:BEFAE0D2-E8DD-4AC7...@microsoft.com...
Put the below function into a REGULAR vba module
Function so(mc)
c = 0
For i = 2 To Cells(Rows.Count, mc).End(xlUp).Row
If Cells(i + 1, mc) = 1 And Cells(i, mc) = 1 Then
c = c + 1
Else
c = 0
End If
'MsgBox c
If c = 7 Then
so = Cells(i, mc).Address
'Cells(1, mc) = Cells(i, mc).Address
Exit For
End If
Next i
End Function
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
dguil...@austin.rr.com
"Herbert Seidenberg" <herbds...@yahoo.com> wrote in message
news:58fc3d79-8618-4a71...@e25g2000prg.googlegroups.com...
=SUM(--(FREQUENCY(IF(List1=1,ROW(List1)),IF(List1<>1,ROW(List1)))=Target))
** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)
--
Biff
Microsoft Excel MVP
"Herbert Seidenberg" <herbds...@yahoo.com> wrote in message
news:58fc3d79-8618-4a71...@e25g2000prg.googlegroups.com...
I didn't but you may need this as the first line in the function.
Application.Volatile
Did you place in a regular module?
Did you change "e" to your column that has the string of 1's?
Is calculation set to automatic? Touch f9 key to calculate
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
dguil...@austin.rr.com
"John67" <Joh...@discussions.microsoft.com> wrote in message
news:69586A7B-DE42-4934...@microsoft.com...
Function so(mc)
Application.Volatile
c = 1
For i = 2 To Cells(Rows.Count, mc).End(xlUp).Row
If Cells(i + 1, mc) = 1 And Cells(i, mc) = 1 Then
c = c + 1
Else
c = 1
End If
'MsgBox c
If c = 7 Then
so = Cells(i + 1, mc).Address
'Cells(1, mc) = Cells(i, mc).Address
Exit For
End If
Next i
End Function
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
dguil...@austin.rr.com
"John67" <Joh...@discussions.microsoft.com> wrote in message
news:69586A7B-DE42-4934...@microsoft.com...