Trying to get an Array to work with Formula Countif, but cant manage to get the countif right, can anyone give me a pointer please? I have a userform with 5 textboxes on it add a search word in 1 or maybe 2 i wanted them to use the countif formula.
Sorry if this seems simple to you guys im still a newbie.
Worksheets("Questions").Activate
Dim WordArray As Variant
WordArray = Array(UsrFormSearch.TxtSearch1.Value, UsrFormSearch.TxtSearch2.Value,
UsrFormSearch.TxtSearch3.Value, UsrFormSearch.TxtSearch4.Value, UsrFormSearch.TxtSearch5.Value)
ActiveSheet.Range("F2").Formula = "=CountIfs(B2:E2, {WordArray})"
LastPopulatedRow = Range("A" & Rows.Count).End(xlUp).Row
Range("F2: " & "F" & LastPopulatedRow).FillDown
Sorry if this seems simple to you guys im still a newbie.
Worksheets("Questions").Activate
Dim WordArray As Variant
WordArray = Array(UsrFormSearch.TxtSearch1.Value, UsrFormSearch.TxtSearch2.Value,
UsrFormSearch.TxtSearch3.Value, UsrFormSearch.TxtSearch4.Value, UsrFormSearch.TxtSearch5.Value)
ActiveSheet.Range("F2").Formula = "=CountIfs(B2:E2, {WordArray})"
LastPopulatedRow = Range("A" & Rows.Count).End(xlUp).Row
Range("F2: " & "F" & LastPopulatedRow).FillDown