View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips[_4_] Bob Phillips[_4_] is offline
external usenet poster
 
Posts: 834
Default How to use vlookup in an array formula

Fow about

=COUNTIF(Sheet1!A1:D20,A1)


"Jill" wrote in message
...
In sheet1, I have rows and columns whose cells contain strings like "S",
"M",
"L", and "XL". Some cells are empty. In sheet2, is a column A of the same
strings and a column B of corresponding values, e.g. 1 corresponds to "S",
4
corresponds to "M", etc. I want to be able to sum the rows and columns in
sheet1 based on the table in sheet2. The array in sheet1 is not the same
size
as the value column in sheet2.

I tried to use an array formula like
{sum(vlookup(sheet1!a1:a20,sheet2!a1:b4,FALSE))} but it doesn't seem to
sum
the array, only the first cell. Also, the empty cells seem to result in
the
#value error.

Any suggestions on how to produce the result I'm looking for? Thanks in
advance.