Function, User Defined
I've tried creating a user defined function that can look at all the sheets in a
workbook and find the number of occurrences of a particular string specified in
the function. The function, which would be used in a tally sheet, would look
something like this:
CountItems(B4, A3, "B1:B30","xyz")
B4 is the column label to match. That is, if the column label is "ABC", I want
the function to find the number of occurrences of my string "xyz" in the sheet
specified by A3.
B1:B30 is the range of column labels on each sheet to look at for the string
that matches B4.
"xyz" is the string I'm looking for.
Any help would be greatly appreciated.
I'd post what code I've tried, but I'm afraid of embarrassing myself. I've
tried using .Find to find the column and then COUNTIF to find the string, but
everything I've tried returns #VALUE.
Thanks.
|