Hello all,
I have a vba userform that populates a worksheet given a formula. This formula has two named ranges:
"Ballots" = offset($L$2,,,counta($L:$L)-1)
"DateHelp" = offset($T$2,,,counta($T:$T)-1)
Here is the array formula that I am trying to use:
{=MAX(IF(Ballots=A2,DateHelp))}
I have attempted to populate a column in my worksheet after I hit a command button in my vba userform. Here is the code that I have been working with:
The problem that I am having is that the MAX/IF formula will not increment downward (i.e. the formula will not switch from looking at cell A2 to A3, etc.)
Any help on this will be very much appreciated!
Thanks,
Zack
I have a vba userform that populates a worksheet given a formula. This formula has two named ranges:
"Ballots" = offset($L$2,,,counta($L:$L)-1)
"DateHelp" = offset($T$2,,,counta($T:$T)-1)
Here is the array formula that I am trying to use:
{=MAX(IF(Ballots=A2,DateHelp))}
I have attempted to populate a column in my worksheet after I hit a command button in my vba userform. Here is the code that I have been working with:
Code:
Private Sub cmdAdd_Click()
Dim WS as Worksheet
Set WS = Sheets("J_ComData")
'Find empty row in the database
iRow = WS.Cells(Rows.Count, 1) _
.End(xlUp).Offset(1, 0).Row
Range("I2:I" & iRow).FormulaArray = "=MAX(IF(Ballots=A2,DateHelp))"
End sub
The problem that I am having is that the MAX/IF formula will not increment downward (i.e. the formula will not switch from looking at cell A2 to A3, etc.)
Any help on this will be very much appreciated!
Thanks,
Zack