I am trying to create an array of 1's and 0's to be used ultimately in a sumproducts function. I have created a named range referring to a column of numbers and want to create a new array of 1's and 0's in order to isolate a cell containing a particular number (.ie. make that cell a zero when all the others are 1's. I am also trying to do this using the evaluate function:
Dim xx as variant
Dim ra as range
Set ra = wb.ActiveSheet.Range("a2").Resize(cntbank) [set range ra to column of numbers]
xx = Application.Evaluate("=if(" & Range(ra).Value & "=14,1,0)") [try to create a logic vector where all of the cells are 1 except for the one equal to 14 which will be 0]
The variable xx is coming up "empty". I am not sure if I am using the "Evaluate" function properly.
Thanks for any help on this.
Bookmarks