#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default COUNTIF - Condition

Hi,
I would like to know how I can count only those number of cells in a row
with a particular value which have their adjacent cell on the left without
any value
Example
A B C D E F
1 w 0 w W
2
3
The answer to above should return value of 2
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,358
Default COUNTIF - Condition

Try sumproduct:
=SUMPRODUCT(--(A2:E10=""),--(B2:F10<""))

assuming you have date from cols A-F and rows 2-10
--
John C


"Sandesh" wrote:

Hi,
I would like to know how I can count only those number of cells in a row
with a particular value which have their adjacent cell on the left without
any value
Example
A B C D E F
1 w 0 w W
2
3
The answer to above should return value of 2

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 793
Default COUNTIF - Condition

To add to John's solution, I think what you need is
=SUMPRODUCT(--(A2:E10=""),--(B2:F10="w"))

"John C" wrote:

Try sumproduct:
=SUMPRODUCT(--(A2:E10=""),--(B2:F10<""))

assuming you have date from cols A-F and rows 2-10
--
John C


"Sandesh" wrote:

Hi,
I would like to know how I can count only those number of cells in a row
with a particular value which have their adjacent cell on the left without
any value
Example
A B C D E F
1 w 0 w W
2
3
The answer to above should return value of 2

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default COUNTIF - Condition

Hi, John & Sheelo,
Thanks for your support, but it seems I have not been able to explain my
problem.
I have data from A1 to F1 as shown in the example. Rest of the rows(A2:F2
and A3: F3) are all blank and do not contain any value and are irrelevant to
the example I have mentioned. They have just been shown there for reference.

I would like to count only the number of cells in row A1: F1 with the
criteria I have mentioned in my earlier example.

"Sheeloo" wrote:

To add to John's solution, I think what you need is
=SUMPRODUCT(--(A2:E10=""),--(B2:F10="w"))

"John C" wrote:

Try sumproduct:
=SUMPRODUCT(--(A2:E10=""),--(B2:F10<""))

assuming you have date from cols A-F and rows 2-10
--
John C


"Sandesh" wrote:

Hi,
I would like to know how I can count only those number of cells in a row
with a particular value which have their adjacent cell on the left without
any value
Example
A B C D E F
1 w 0 w W
2
3
The answer to above should return value of 2

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 793
Default COUNTIF - Condition

enter the following into the cell you want the result to be;
=SUMPRODUCT(--(A1:Y1=""),--(B1:Z1="w"))

This assumes your data is upto the column Z in row 1. Simply replace Z by
the last column in your dataset and Y with the second last column in your
data set.

Let us know whether it solves your problem.

"Sandesh" wrote:

Hi, John & Sheelo,
Thanks for your support, but it seems I have not been able to explain my
problem.
I have data from A1 to F1 as shown in the example. Rest of the rows(A2:F2
and A3: F3) are all blank and do not contain any value and are irrelevant to
the example I have mentioned. They have just been shown there for reference.

I would like to count only the number of cells in row A1: F1 with the
criteria I have mentioned in my earlier example.

"Sheeloo" wrote:

To add to John's solution, I think what you need is
=SUMPRODUCT(--(A2:E10=""),--(B2:F10="w"))

"John C" wrote:

Try sumproduct:
=SUMPRODUCT(--(A2:E10=""),--(B2:F10<""))

assuming you have date from cols A-F and rows 2-10
--
John C


"Sandesh" wrote:

Hi,
I would like to know how I can count only those number of cells in a row
with a particular value which have their adjacent cell on the left without
any value
Example
A B C D E F
1 w 0 w W
2
3
The answer to above should return value of 2



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default COUNTIF - Condition

Dear Sheeloo,

Thanks for your reply but unfortunately it dose not work.

Regards
Sandesh

"Sheeloo" wrote:

enter the following into the cell you want the result to be;
=SUMPRODUCT(--(A1:Y1=""),--(B1:Z1="w"))

This assumes your data is upto the column Z in row 1. Simply replace Z by
the last column in your dataset and Y with the second last column in your
data set.

Let us know whether it solves your problem.

"Sandesh" wrote:

Hi, John & Sheelo,
Thanks for your support, but it seems I have not been able to explain my
problem.
I have data from A1 to F1 as shown in the example. Rest of the rows(A2:F2
and A3: F3) are all blank and do not contain any value and are irrelevant to
the example I have mentioned. They have just been shown there for reference.

I would like to count only the number of cells in row A1: F1 with the
criteria I have mentioned in my earlier example.

"Sheeloo" wrote:

To add to John's solution, I think what you need is
=SUMPRODUCT(--(A2:E10=""),--(B2:F10="w"))

"John C" wrote:

Try sumproduct:
=SUMPRODUCT(--(A2:E10=""),--(B2:F10<""))

assuming you have date from cols A-F and rows 2-10
--
John C


"Sandesh" wrote:

Hi,
I would like to know how I can count only those number of cells in a row
with a particular value which have their adjacent cell on the left without
any value
Example
A B C D E F
1 w 0 w W
2
3
The answer to above should return value of 2

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 793
Default COUNTIF - Condition

I forgot to mention that you need to press CTRL-SHIFT-ENTER after typing the
formula as this is an ARRAY formula...

It should work. I tested it out. Send your file (or just a mail so that I
get your id) to me at and I will enter the formula and
send back to you.

"Sandesh" wrote:

Dear Sheeloo,

Thanks for your reply but unfortunately it dose not work.

Regards
Sandesh

"Sheeloo" wrote:

enter the following into the cell you want the result to be;
=SUMPRODUCT(--(A1:Y1=""),--(B1:Z1="w"))

This assumes your data is upto the column Z in row 1. Simply replace Z by
the last column in your dataset and Y with the second last column in your
data set.

Let us know whether it solves your problem.

"Sandesh" wrote:

Hi, John & Sheelo,
Thanks for your support, but it seems I have not been able to explain my
problem.
I have data from A1 to F1 as shown in the example. Rest of the rows(A2:F2
and A3: F3) are all blank and do not contain any value and are irrelevant to
the example I have mentioned. They have just been shown there for reference.

I would like to count only the number of cells in row A1: F1 with the
criteria I have mentioned in my earlier example.

"Sheeloo" wrote:

To add to John's solution, I think what you need is
=SUMPRODUCT(--(A2:E10=""),--(B2:F10="w"))

"John C" wrote:

Try sumproduct:
=SUMPRODUCT(--(A2:E10=""),--(B2:F10<""))

assuming you have date from cols A-F and rows 2-10
--
John C


"Sandesh" wrote:

Hi,
I would like to know how I can count only those number of cells in a row
with a particular value which have their adjacent cell on the left without
any value
Example
A B C D E F
1 w 0 w W
2
3
The answer to above should return value of 2

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default COUNTIF - Condition

Sheeloo,

I sent u mail on the address u gave but it came back undelivered. My email
ID is

Regards

"Sheeloo" wrote:

I forgot to mention that you need to press CTRL-SHIFT-ENTER after typing the
formula as this is an ARRAY formula...

It should work. I tested it out. Send your file (or just a mail so that I
get your id) to me at
and I will enter the formula and
send back to you.

"Sandesh" wrote:

Dear Sheeloo,

Thanks for your reply but unfortunately it dose not work.

Regards
Sandesh

"Sheeloo" wrote:

enter the following into the cell you want the result to be;
=SUMPRODUCT(--(A1:Y1=""),--(B1:Z1="w"))

This assumes your data is upto the column Z in row 1. Simply replace Z by
the last column in your dataset and Y with the second last column in your
data set.

Let us know whether it solves your problem.

"Sandesh" wrote:

Hi, John & Sheelo,
Thanks for your support, but it seems I have not been able to explain my
problem.
I have data from A1 to F1 as shown in the example. Rest of the rows(A2:F2
and A3: F3) are all blank and do not contain any value and are irrelevant to
the example I have mentioned. They have just been shown there for reference.

I would like to count only the number of cells in row A1: F1 with the
criteria I have mentioned in my earlier example.

"Sheeloo" wrote:

To add to John's solution, I think what you need is
=SUMPRODUCT(--(A2:E10=""),--(B2:F10="w"))

"John C" wrote:

Try sumproduct:
=SUMPRODUCT(--(A2:E10=""),--(B2:F10<""))

assuming you have date from cols A-F and rows 2-10
--
John C


"Sandesh" wrote:

Hi,
I would like to know how I can count only those number of cells in a row
with a particular value which have their adjacent cell on the left without
any value
Example
A B C D E F
1 w 0 w W
2
3
The answer to above should return value of 2

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
countif and sum if if two condition are satisfied zafar62 Excel Worksheet Functions 3 July 15th 08 06:22 AM
Multiple condition countif for excel 2003 goayimm Excel Worksheet Functions 5 May 30th 08 08:22 AM
COUNTIF - more than one condition Gary Excel Worksheet Functions 4 May 8th 07 08:46 PM
Compound condition with COUNTIF Mike McLellan Excel Discussion (Misc queries) 1 November 29th 05 10:50 AM
countif condition problem Scott Excel Worksheet Functions 8 November 11th 05 08:59 AM


All times are GMT +1. The time now is 12:26 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"