Why does this need to be in a message box - wouldn't a pivot table work
better? If you do want it in a message box, do you want to see ALL
results at once, or just selected items (see my reply at allexperts.com
for the selected item)
at it's simples
msgbox worksheetfunction.countif(Range(RangeToCheck),Data ToCheck)
replacing rangetocheck and datatocheck will give you a single message
box
Putting this in a loop, and perhaps storing the results in a string
then displaying that string would give you multiple iterations.
M3Cobb wrote:
I've got a list of data that i frequently refer to.
What i want to do is to have a macro that will do a countif function
and then show the results in a message box:
Apples = 5
pears = 2
oranges = 4
thanks
--
M3Cobb
------------------------------------------------------------------------
M3Cobb's Profile: http://www.excelforum.com/member.php...o&userid=24986
View this thread: http://www.excelforum.com/showthread...hreadid=550918