Recently I was creating a spreadsheet where I needed to use heaps of nested vlookups within a hlookups - I tried without success to create a UDF. -
My spreadsheet formula was
=HLOOKUP(E11,$M$36:$Q$49,VLOOKUP(F11,$M$36:$Q$49,2,FALSE),FALSE)
The UDF variables were hlu = E11, vlu = F11 & agmass = $M$36:$Q$49.
The UDF started 'Function LU(vlu, hlu, agmass)