Sorry for delaying my response, working from home on my iMac and excel for apple is a nightmare, not as many functions. Anyway, thinking about it if I needed to do it I would probably set up a helper column so in say col C, put in an if then stmt like
=if(B2="doctype3","C","A&B") then do a countif stmt in col D of the A&B and C in column C.
Tried it and it worked. It may not be the most elegant way and there may be a way using index or sumproduct to do it but offhand I can't think of another way.
Bookmarks