Debraj
Excel Ninja
Hi Excelian,
Can someone please help me to write any EVALUATE function.. with Ctrl + Shift + Enter..
i.e..
[pre]
Expected Formula
[C2:C36].FormulaArray = "=COUNTIF($B$2:$B$36,$B$2:$B$36)"[/code]
Thanks in advance..
Regards,
Deb
Can someone please help me to write any EVALUATE function.. with Ctrl + Shift + Enter..
i.e..
[pre]
Code:
Sub EvaluateWithCSE()
Set SD = ThisWorkbook.Sheets("SalesData")
lr = Cells(1, 1).CurrentRegion.Rows.Count
lc = Cells(1, 1).CurrentRegion.Columns.Count
'----
'Want to write below loop in OneGo..
For i = 2 To lr
Cells(i, lc + 1) = Evaluate("COUNTIF($B$2:$B$" & lr & ",$B" & i & ")")
Next i
'Something Like below
'Range(Cells(i, lc + 1),cells(lr,lc+1)) = Evaluate("COUNTIF($B$2:$B$" & lr & ",$B$2:$B$" & lr & ")"")
'----
End Sub[/pre]
Applied Formula
[code]=COUNTIF($B$2:$B$36,B2)
Expected Formula
[C2:C36].FormulaArray = "=COUNTIF($B$2:$B$36,$B$2:$B$36)"[/code]
Thanks in advance..
Regards,
Deb