IosifFlorin
New Member
- Joined
- Jul 1, 2015
- Messages
- 18
Hi,
i am trying to build a macro code for a function that will replace the index/match function (trying to make it simpler.
What i build:
and how i want to apply it in excel is something like this (having this in a table so referencing @ a cell in the table that will vary depending on the the difference value). Price1SA is a range predefined.
=FLook(Price1SA,[@[Product Code]])
Any idea what to adjust in order to work? Maybe some variables to define?
Thank you!
Iosif
i am trying to build a macro code for a function that will replace the index/match function (trying to make it simpler.
What i build:
Function FLook(myRange, LookupValue)
test = Application.WorksheetFunction.Index(myRange, Application.WorksheetFunction.Match(LookupValue, ProdCodBandings, 0))
End Function
and how i want to apply it in excel is something like this (having this in a table so referencing @ a cell in the table that will vary depending on the the difference value). Price1SA is a range predefined.
=FLook(Price1SA,[@[Product Code]])
Any idea what to adjust in order to work? Maybe some variables to define?
Thank you!
Iosif