hi there, it's been a while since I used VBA and could do with help here. I'd like to create a function to lookup all instances of a particular value and return results from a few columns, each result on a new line but within a single string, using char(10) to separate results.
' get all the row numbers by looping through this until Row(n:n) returns no more values:
' RowNum =SMALL(IF('expenses'!$H:$H=LookupValue,ROW('expenses'!$H:$H)),ROW(1:1))
' Result =INDEX('expenses'!$A$1:$N$9999,RowNum, 5)
' for each rownum
LookupExpense = LookupExpense & char(10) & Result
Any help much appreciated thanks! :-)