View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Count if with several areas/conditions

Assume you tables is in A1:B50 with row 1 having

Window Type Floor


and is located on sheet1

Assume on sheet2 you have the results table you show with the upper left
corner in A1

in B2 you would put a formula like

=Sumproduct(--(Sheet1!$A$:$A$50=$A2),--(Sheet1!$B$1:$B$50=Right(B$1,1)*1))

then drag fill this formula down and to the right.

--
Regards,
Tom Ogilvy

"Marielle" wrote in message
...
Hi and thanks!

Unfortunately I still don't get the result I want... I must still be doing
something wrong... Or are there other ways to do it? I'll try to explain a
bit mo

Here's an example of the table I use:

Window type Floor Size Etc.
V3.1 1
V3.1 1
V3.1 2
V3.1 3
V3.1 3
V3.1 3
V3.2 1
V3.2 1
V3.2 2

I want the formula to count how many of each window type there are in each
floor. In this case the result would be:

Window type Floor 1 Floor 2 Floor 3
V3.1 2 1 3
V3.2 2 1 0

I hope you can help me. I've been stuck with this problem for two days!
Thank you ;o)

Marielle


"Roger Govier" wrote:

Hi Marielle

One way
=SUMPRODUCT(--(A1:A30="V"),--(F1:F30="A"))

--
Regards

Roger Govier


"Marielle" wrote in message
...
I want to create a countif formula containing two areas and conditions,
i.e.
=countif(A1:A30;"V1") AND (F1:F30;"A"). How do I write the formula to
make
it work? Please help...