View Single Post
 
Old 04-30-2018, 10:02 AM
SailorJerry7030 SailorJerry7030 is offline Windows 7 64bit Office 2016
Novice
 
Join Date: Apr 2018
Posts: 7
SailorJerry7030 is on a distinguished road
Default

Quote:
Originally Posted by NoSparks View Post
Using NBVC's formula, adjusted for the columns you actually want, and the sample workbook you posted over there....see if this works

Code:
Sub Clusters()
Dim lr As Long
With Sheets("Sheet3")
    lr = .Cells(2, "A").End(xlDown).Row
    .Range("Q2").FormulaArray = "=SUM(--((FREQUENCY(IF(B2:M2>0, COLUMN(B2:M2)),IF(B2:M2=0,COLUMN(B2:M2))))>1))"
    .Range("Q2").AutoFill Destination:=Range("Q2:Q" & lr)
End With
End Sub
Perfect! I was having difficulty fitting that formula into the code, but this does it!
Reply With Quote