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.
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.
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.
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.