View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
MISSY371 MISSY371 is offline
external usenet poster
 
Posts: 1
Default Lookup and count in the same formula

Hello,

I need a formula that looks up a value in row 1 on sheet2 and returns the
count of a range in the colmun that matches the lookup in sheet1. For
example:

Sheet2 - Feed Sheet
Smithfield
RSM John Doe
ASM Jenn Smith
ASM2 Brian Smith

So Smithfield has 1 RSM and 2 ASMs

Sheet1
RSM ASM
Smithfield 1 2

So I want a formula to return the count of how many RSM's and ASM's are in a
specific location. I have this:
=(HLOOKUP(A1,Sheet2!A1:A6,(COUNTA(Sheet2!A5:A6)),F ALSE)) but it's just
returning 0. Any suggestions?