Lefemmenikita
Board Regular
- Joined
- Jan 28, 2014
- Messages
- 59
- Office Version
- 2013
- Platform
- Windows
Hi
I am dealing with thousands of rows of data.
I am trying to use the multiple criteria index and match in a VBA formula to return a result.
The formula I am currently using is:
This runs out of memory before cycling through all the cells in the column and returning a result
My question is:
Is there a way to make an index/match formula use a dynamic column reference? (therefore, eliminating the need to have an "if" statement in the above array formula)?
Also, is there a way to have an array index/match formula execute via VBA without running out of memory?
I am able to do this outside of VBA, though it takes around 5 mins for Excel to finish calculating the result before I am able to replace the formula with the calculated value.
Hope my question makes sense
Thanks
I am dealing with thousands of rows of data.
I am trying to use the multiple criteria index and match in a VBA formula to return a result.
The formula I am currently using is:
Code:
Selection.FormulaArray ="=IF(RC[-3]=""Billable"",INDEX(Coding!C1:C5,MATCH(1,(Coding!C1=Data!RC11)*(Coding!C2=Data!RC1),0),3),INDEX(Coding!C1:C5,MATCH(1,(Coding!C1=Data!RC11)*(Coding!C2=Data!RC1),0),4))"
Range("P2").Select
Columns("P:P").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
This runs out of memory before cycling through all the cells in the column and returning a result
My question is:
Is there a way to make an index/match formula use a dynamic column reference? (therefore, eliminating the need to have an "if" statement in the above array formula)?
Also, is there a way to have an array index/match formula execute via VBA without running out of memory?
I am able to do this outside of VBA, though it takes around 5 mins for Excel to finish calculating the result before I am able to replace the formula with the calculated value.
Hope my question makes sense
Thanks