I am trying to work out how I can replace RICI notation with names in my worksheet in a formula array . This works.
The formula in M3 is
=IFERROR(INDEX(Expense2, MATCH(0,IF(ISBLANK(Expense2),1,COUNTIF($M$2:M2, Expense2)), 0)),"")
What I want to do is have the count function use names like this.
The code does not throw up any errors this it what it enters in M3
=IFERROR(INDEX(Expense2, MATCH(0,IF(ISBLANK(Expense2),1,CountIf (FirstArr:M2, Expense2)), 0)),"")
I have tried making FirtsArr a range Reference with square brackets that throws an error. I need to understand if one can mix R1C1 notation with names and no amount of searching has produced a result.
Thanks
Code:
Range("M3").Select
Selection.FormulaArray = _
"=IFERROR(INDEX(Expense2, MATCH(0,IF(ISBLANK(Expense2),1,COUNTIF(R2C13:R[-1]C, Expense2)), 0)),"""")"
Selection.AutoFill Destination:=Range("M3:M14"), Type:=xlFillDefault
Range("M3:M14").Copy
Selection.PasteSpecial Paste:=xlValues
The formula in M3 is
=IFERROR(INDEX(Expense2, MATCH(0,IF(ISBLANK(Expense2),1,COUNTIF($M$2:M2, Expense2)), 0)),"")
What I want to do is have the count function use names like this.
Code:
Range("M3").Select
FirstArr = ActiveCell.Offset(-1, 0).Address
Fixrow = ActiveCell.Row
FixCol = ActiveCell.Column
Selection.FormulaArray = _
"=IFERROR(INDEX(Expense2, MATCH(0,IF(ISBLANK(Expense2),1,CountIf (FirstArr:R[-1]C, Expense2)), 0)),"""")"
The code does not throw up any errors this it what it enters in M3
=IFERROR(INDEX(Expense2, MATCH(0,IF(ISBLANK(Expense2),1,CountIf (FirstArr:M2, Expense2)), 0)),"")
I have tried making FirtsArr a range Reference with square brackets that throws an error. I need to understand if one can mix R1C1 notation with names and no amount of searching has produced a result.
Thanks