hello,
I'm a new member, and I'm a beginner in vba excel macro....
I need to use excel macro to write this as vba array code:
=MAX(IF(C:C=B3,D:D,0))
I did it by pressing Ctrl+Shift+Enter
1.jpg
I need to set it to a one element array s(0,0) with one number and set it to one cells(3,7) as an array cell, then I have to Put it into loop in cells (i,7) ,and if possible I want to put all results in one array named s and then set it into "J:J" on my workesheet
I tried this code:
Private Sub Worksheet_Activate()
Dim s(0, 0) As Single
For i = 3 To 355
s = "=MAX(IF(C:C=cells(i,2);D:D;0))"
Cells(i, 7) = s
Next i
End Sub
yet, thier are some mistakes in my code because I don't Know How to deal with arrays in vba code and the code won't work without array form ........ I tryed alot to search the solve and tried " .formulaarray " but no results...
Bookmarks