lundi 23 novembre 2015

Dynamic Range in an IF Statement

Default Dyanmic Range in an IF statement

Hello,

Im trying to run a dynamic range starting at a cell defined by another cell.

The first part of my dynamic range works, ending at a cell defined by another cell.

If CheckBox1.Value = True And CheckBox2.Value = True Then

With Sheets("Summary").Range("E22")

.FormulaArray = "=IFERROR(INDEX('1600 Daily'!G$3:G$300, SMALL(IF('1600 Daily'!$F$2:$F$300=1, ROW('1600 Daily'!$F$2:$F$300)-2),ROWS(G$2:G2))),"""")"

.AutoFill Destination:=Range("E22", Cells(Range("M4"), "E")), Type:=xlFillDefault

End With

End If

I just need this formula performed across the range of cells. It seems to be this small section that doesnt work 'Range(Cells(Range("M4"), "E")))'

Thanks in advance for any help anyone can provide!

Aucun commentaire:

Enregistrer un commentaire