formula decides whether there is 4 contagious non blank cell

sony

Board Regular
Joined
Jun 15, 2002
Messages
126
i have a 52 cells, say, A1~A52
i want to have the formula to let me know "yes" or "no"in cell A53 , whether there are 4 cell <> blank contagiously in any four cell out of the 52 cells.

what is the formula?

thanks
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Try this.

Paste this code into a VBA module.
Code:
Function Find4InARow() As Boolean
    Dim c As Range
    Dim count As Integer
   
    For Each c In ActiveSheet.Range("A1:A52")
        If Len(c.Value) > 0 Then
            count = count + 1
            If count > 3 Then
                Find4InARow = True
                Exit Function
            End If
        Else
            count = 0
        End If
    Next
    Find4InARow = False
End Function

In cell A53, enter (without the quotation marks) "=Find4InARow()" and press ENTER.
 
Upvote 0
Re: formula decides whether there is 4 contagious non blank

i have a 52 cells, say, A1~A52
i want to have the formula to let me know "yes" or "no"in cell A53 , whether there are 4 cell <> blank contagiously in any four cell out of the 52 cells.

what is the formula?

thanks

A53:

Control+shift+enter...

=ISNUMBER(MATCH(TRUE,FREQUENCY(IF(A1:A52<>"",ROW(A1:A52)),IF(A1:A52="",ROW(A1:A52)))>=4,0))
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,720
Members
448,986
Latest member
andreguerra

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