Function, User Defined
Bill,
I found this post somewhat confusing. Can I seek clarification?
At one point you say all sheets, then you mention the sheet specified by A3.
A3 is a cell id, so what exactly do you mean?
I also got confused by the column labels for B4 and B1:B30. What exactly do
you mean by all of this?
--
HTH
Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
"Bill Oertell" wrote in message
...
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.
|