Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 271
Default Write a formula using two arrays, across two worksheets

What I want to do is write a formula that will gather information from one
column in a different worksheet (same workbook) based on a condition, then
using the results to further look another column and get results based on
another condition.
For example, I want to know how many times EU3 appears in column E, and then
of those appearances then find out how many of those are <4 in column N.
(How many times does = less than 4? answer is 3

Column:
E F N O P
EU3 0 0 F Y
EE3 15 14 H Y
579 6 4 H Y
EU3 4 3 K Y
EE3 4 3 H Y

Thanks for any help!
Susan



  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 913
Default Write a formula using two arrays, across two worksheets

On Mon, 28 Jul 2008 09:49:14 -0700, Susan
wrote:

What I want to do is write a formula that will gather information from one
column in a different worksheet (same workbook) based on a condition, then
using the results to further look another column and get results based on
another condition.
For example, I want to know how many times EU3 appears in column E, and then
of those appearances then find out how many of those are <4 in column N.
(How many times does = less than 4? answer is 3

Column:
E F N O P
EU3 0 0 F Y
EE3 15 14 H Y
579 6 4 H Y
EU3 4 3 K Y
EE3 4 3 H Y

Thanks for any help!
Susan




Try these formulas:

=COUNTIF(E1:E100,"=EU3")
for the number of EU3's in (first 100 rows of) column E


=SUMPRODUCT(- -(E1:E100="EU3"),- -(N1:N100<4))
for the number of EU3's that have a value less than 4 in column N

As there are only two EU3 in column E in your sample data, how can you
expect the result that three of them has a value less than 4 in column
N? Have I missed anything?

Hope this helps / Lars-Åke
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 70
Default Write a formula using two arrays, across two worksheets

Lars,
I tried this formula and it does not produce the correct answer for me.
I have two conditions also. I want my formula to compare range f6:f52 and
g6:g52 on sheet1 for employees who are <=54yo with <=9 yrs of service and
place my answer which should be 20 on sheet2 b3.
I have tried =Countif(sheet1!f6:f52<=54)-Countif(sheet1!g6:g52<=9); however,
this produces the wrong anwer as well.
I also tried =sumproduct(--(sheet1!f6:f52<="54"),--(sheet1!g6:g52<="9")).
This too did not work. This formula produces 47, which is those employees
under 54 or equal and those employees with yrs of svc under 9yrs or less
(regardless of age).

Is countif the right formula?
Please help.

"Lars-Ã…ke Aspelin" wrote:

On Mon, 28 Jul 2008 09:49:14 -0700, Susan
wrote:

What I want to do is write a formula that will gather information from one
column in a different worksheet (same workbook) based on a condition, then
using the results to further look another column and get results based on
another condition.
For example, I want to know how many times EU3 appears in column E, and then
of those appearances then find out how many of those are <4 in column N.
(How many times does = less than 4? answer is 3

Column:
E F N O P
EU3 0 0 F Y
EE3 15 14 H Y
579 6 4 H Y
EU3 4 3 K Y
EE3 4 3 H Y

Thanks for any help!
Susan




Try these formulas:

=COUNTIF(E1:E100,"=EU3")
for the number of EU3's in (first 100 rows of) column E


=SUMPRODUCT(- -(E1:E100="EU3"),- -(N1:N100<4))
for the number of EU3's that have a value less than 4 in column N

As there are only two EU3 in column E in your sample data, how can you
expect the result that three of them has a value less than 4 in column
N? Have I missed anything?

Hope this helps / Lars-Ã…ke

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 913
Default Write a formula using two arrays, across two worksheets

On Mon, 28 Jul 2008 11:21:18 -0700, Vicki
wrote:

Lars,
I tried this formula and it does not produce the correct answer for me.
I have two conditions also. I want my formula to compare range f6:f52 and
g6:g52 on sheet1 for employees who are <=54yo with <=9 yrs of service and
place my answer which should be 20 on sheet2 b3.
I have tried =Countif(sheet1!f6:f52<=54)-Countif(sheet1!g6:g52<=9); however,
this produces the wrong anwer as well.
I also tried =sumproduct(--(sheet1!f6:f52<="54"),--(sheet1!g6:g52<="9")).
This too did not work. This formula produces 47, which is those employees
under 54 or equal and those employees with yrs of svc under 9yrs or less
(regardless of age).

Is countif the right formula?
Please help.

"Lars-Åke Aspelin" wrote:

On Mon, 28 Jul 2008 09:49:14 -0700, Susan
wrote:

What I want to do is write a formula that will gather information from one
column in a different worksheet (same workbook) based on a condition, then
using the results to further look another column and get results based on
another condition.
For example, I want to know how many times EU3 appears in column E, and then
of those appearances then find out how many of those are <4 in column N.
(How many times does = less than 4? answer is 3

Column:
E F N O P
EU3 0 0 F Y
EE3 15 14 H Y
579 6 4 H Y
EU3 4 3 K Y
EE3 4 3 H Y

Thanks for any help!
Susan




Try these formulas:

=COUNTIF(E1:E100,"=EU3")
for the number of EU3's in (first 100 rows of) column E


=SUMPRODUCT(- -(E1:E100="EU3"),- -(N1:N100<4))
for the number of EU3's that have a value less than 4 in column N

As there are only two EU3 in column E in your sample data, how can you
expect the result that three of them has a value less than 4 in column
N? Have I missed anything?

Hope this helps / Lars-Åke



In the COUNTIF formula you should have " " around the condition.
In the SUMPRODUCT formula you should not have any " " around the
value you compare with.

In the example you wrote you had the other way around.

Hope this helps / Lars-Åke
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 271
Default Write a formula using two arrays, across two worksheets

Thank you. This worked on the first cell. But when I copied to another
cell, and changed the E column requirements (for example, changed EU3 to 771)
the formula returned a 0 result. Any ideas?

Susan

"Lars-Ã…ke Aspelin" wrote:

On Mon, 28 Jul 2008 11:21:18 -0700, Vicki
wrote:

Lars,
I tried this formula and it does not produce the correct answer for me.
I have two conditions also. I want my formula to compare range f6:f52 and
g6:g52 on sheet1 for employees who are <=54yo with <=9 yrs of service and
place my answer which should be 20 on sheet2 b3.
I have tried =Countif(sheet1!f6:f52<=54)-Countif(sheet1!g6:g52<=9); however,
this produces the wrong anwer as well.
I also tried =sumproduct(--(sheet1!f6:f52<="54"),--(sheet1!g6:g52<="9")).
This too did not work. This formula produces 47, which is those employees
under 54 or equal and those employees with yrs of svc under 9yrs or less
(regardless of age).

Is countif the right formula?
Please help.

"Lars-Ã…ke Aspelin" wrote:

On Mon, 28 Jul 2008 09:49:14 -0700, Susan
wrote:

What I want to do is write a formula that will gather information from one
column in a different worksheet (same workbook) based on a condition, then
using the results to further look another column and get results based on
another condition.
For example, I want to know how many times EU3 appears in column E, and then
of those appearances then find out how many of those are <4 in column N.
(How many times does = less than 4? answer is 3

Column:
E F N O P
EU3 0 0 F Y
EE3 15 14 H Y
579 6 4 H Y
EU3 4 3 K Y
EE3 4 3 H Y

Thanks for any help!
Susan




Try these formulas:

=COUNTIF(E1:E100,"=EU3")
for the number of EU3's in (first 100 rows of) column E


=SUMPRODUCT(- -(E1:E100="EU3"),- -(N1:N100<4))
for the number of EU3's that have a value less than 4 in column N

As there are only two EU3 in column E in your sample data, how can you
expect the result that three of them has a value less than 4 in column
N? Have I missed anything?

Hope this helps / Lars-Ã…ke



In the COUNTIF formula you should have " " around the condition.
In the SUMPRODUCT formula you should not have any " " around the
value you compare with.

In the example you wrote you had the other way around.

Hope this helps / Lars-Ã…ke



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 913
Default Write a formula using two arrays, across two worksheets

On Mon, 28 Jul 2008 14:21:27 -0700, Susan
wrote:

Thank you. This worked on the first cell. But when I copied to another
cell, and changed the E column requirements (for example, changed EU3 to 771)
the formula returned a 0 result. Any ideas?

Susan

"Lars-Åke Aspelin" wrote:

On Mon, 28 Jul 2008 11:21:18 -0700, Vicki
wrote:

Lars,
I tried this formula and it does not produce the correct answer for me.
I have two conditions also. I want my formula to compare range f6:f52 and
g6:g52 on sheet1 for employees who are <=54yo with <=9 yrs of service and
place my answer which should be 20 on sheet2 b3.
I have tried =Countif(sheet1!f6:f52<=54)-Countif(sheet1!g6:g52<=9); however,
this produces the wrong anwer as well.
I also tried =sumproduct(--(sheet1!f6:f52<="54"),--(sheet1!g6:g52<="9")).
This too did not work. This formula produces 47, which is those employees
under 54 or equal and those employees with yrs of svc under 9yrs or less
(regardless of age).

Is countif the right formula?
Please help.

"Lars-Åke Aspelin" wrote:

On Mon, 28 Jul 2008 09:49:14 -0700, Susan
wrote:

What I want to do is write a formula that will gather information from one
column in a different worksheet (same workbook) based on a condition, then
using the results to further look another column and get results based on
another condition.
For example, I want to know how many times EU3 appears in column E, and then
of those appearances then find out how many of those are <4 in column N.
(How many times does = less than 4? answer is 3

Column:
E F N O P
EU3 0 0 F Y
EE3 15 14 H Y
579 6 4 H Y
EU3 4 3 K Y
EE3 4 3 H Y

Thanks for any help!
Susan




Try these formulas:

=COUNTIF(E1:E100,"=EU3")
for the number of EU3's in (first 100 rows of) column E


=SUMPRODUCT(- -(E1:E100="EU3"),- -(N1:N100<4))
for the number of EU3's that have a value less than 4 in column N

As there are only two EU3 in column E in your sample data, how can you
expect the result that three of them has a value less than 4 in column
N? Have I missed anything?

Hope this helps / Lars-Åke



In the COUNTIF formula you should have " " around the condition.
In the SUMPRODUCT formula you should not have any " " around the
value you compare with.

In the example you wrote you had the other way around.

Hope this helps / Lars-Åke



=SUMPRODUCT(- -(""&E1:E100="xxx"),- -(N1:N100<4))

will work also if xxx happens to be a number like 771

Lars-Åke


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 271
Default Write a formula using two arrays, across two worksheets

Hi, that worked great. Now, one more question-can I add another arguement on
the end, where it asks for <4, to ask for <4 but not less than 0?

Thanks,
Susan

"Lars-Ã…ke Aspelin" wrote:

On Mon, 28 Jul 2008 14:21:27 -0700, Susan
wrote:

Thank you. This worked on the first cell. But when I copied to another
cell, and changed the E column requirements (for example, changed EU3 to 771)
the formula returned a 0 result. Any ideas?

Susan

"Lars-Ã…ke Aspelin" wrote:

On Mon, 28 Jul 2008 11:21:18 -0700, Vicki
wrote:

Lars,
I tried this formula and it does not produce the correct answer for me.
I have two conditions also. I want my formula to compare range f6:f52 and
g6:g52 on sheet1 for employees who are <=54yo with <=9 yrs of service and
place my answer which should be 20 on sheet2 b3.
I have tried =Countif(sheet1!f6:f52<=54)-Countif(sheet1!g6:g52<=9); however,
this produces the wrong anwer as well.
I also tried =sumproduct(--(sheet1!f6:f52<="54"),--(sheet1!g6:g52<="9")).
This too did not work. This formula produces 47, which is those employees
under 54 or equal and those employees with yrs of svc under 9yrs or less
(regardless of age).

Is countif the right formula?
Please help.

"Lars-Ã…ke Aspelin" wrote:

On Mon, 28 Jul 2008 09:49:14 -0700, Susan
wrote:

What I want to do is write a formula that will gather information from one
column in a different worksheet (same workbook) based on a condition, then
using the results to further look another column and get results based on
another condition.
For example, I want to know how many times EU3 appears in column E, and then
of those appearances then find out how many of those are <4 in column N.
(How many times does = less than 4? answer is 3

Column:
E F N O P
EU3 0 0 F Y
EE3 15 14 H Y
579 6 4 H Y
EU3 4 3 K Y
EE3 4 3 H Y

Thanks for any help!
Susan




Try these formulas:

=COUNTIF(E1:E100,"=EU3")
for the number of EU3's in (first 100 rows of) column E


=SUMPRODUCT(- -(E1:E100="EU3"),- -(N1:N100<4))
for the number of EU3's that have a value less than 4 in column N

As there are only two EU3 in column E in your sample data, how can you
expect the result that three of them has a value less than 4 in column
N? Have I missed anything?

Hope this helps / Lars-Ã…ke



In the COUNTIF formula you should have " " around the condition.
In the SUMPRODUCT formula you should not have any " " around the
value you compare with.

In the example you wrote you had the other way around.

Hope this helps / Lars-Ã…ke



=SUMPRODUCT(- -(""&E1:E100="xxx"),- -(N1:N100<4))

will work also if xxx happens to be a number like 771

Lars-Ã…ke



  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Write a formula using two arrays, across two worksheets

Yes, you can.
--
David Biddulph

"Susan" wrote in message
...
Hi, that worked great. Now, one more question-can I add another arguement
on
the end, where it asks for <4, to ask for <4 but not less than 0?

Thanks,
Susan

"Lars-Åke Aspelin" wrote:

On Mon, 28 Jul 2008 14:21:27 -0700, Susan
wrote:

Thank you. This worked on the first cell. But when I copied to another
cell, and changed the E column requirements (for example, changed EU3 to
771)
the formula returned a 0 result. Any ideas?

Susan

"Lars-Åke Aspelin" wrote:

On Mon, 28 Jul 2008 11:21:18 -0700, Vicki
wrote:

Lars,
I tried this formula and it does not produce the correct answer for
me.
I have two conditions also. I want my formula to compare range
f6:f52 and
g6:g52 on sheet1 for employees who are <=54yo with <=9 yrs of service
and
place my answer which should be 20 on sheet2 b3.
I have tried =Countif(sheet1!f6:f52<=54)-Countif(sheet1!g6:g52<=9);
however,
this produces the wrong anwer as well.
I also tried
=sumproduct(--(sheet1!f6:f52<="54"),--(sheet1!g6:g52<="9")).
This too did not work. This formula produces 47, which is those
employees
under 54 or equal and those employees with yrs of svc under 9yrs or
less
(regardless of age).

Is countif the right formula?
Please help.

"Lars-Åke Aspelin" wrote:

On Mon, 28 Jul 2008 09:49:14 -0700, Susan
wrote:

What I want to do is write a formula that will gather information
from one
column in a different worksheet (same workbook) based on a
condition, then
using the results to further look another column and get results
based on
another condition.
For example, I want to know how many times EU3 appears in column
E, and then
of those appearances then find out how many of those are <4 in
column N.
(How many times does = less than 4? answer is 3

Column:
E F N O P
EU3 0 0 F Y
EE3 15 14 H Y
579 6 4 H Y
EU3 4 3 K Y
EE3 4 3 H Y

Thanks for any help!
Susan




Try these formulas:

=COUNTIF(E1:E100,"=EU3")
for the number of EU3's in (first 100 rows of) column E


=SUMPRODUCT(- -(E1:E100="EU3"),- -(N1:N100<4))
for the number of EU3's that have a value less than 4 in column N

As there are only two EU3 in column E in your sample data, how can
you
expect the result that three of them has a value less than 4 in
column
N? Have I missed anything?

Hope this helps / Lars-Åke



In the COUNTIF formula you should have " " around the condition.
In the SUMPRODUCT formula you should not have any " " around the
value you compare with.

In the example you wrote you had the other way around.

Hope this helps / Lars-Åke



=SUMPRODUCT(- -(""&E1:E100="xxx"),- -(N1:N100<4))

will work also if xxx happens to be a number like 771

Lars-Åke





  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 271
Default Write a formula using two arrays, across two worksheets

What arguement would I use after <4? An and command?

"David Biddulph" wrote:

Yes, you can.
--
David Biddulph

"Susan" wrote in message
...
Hi, that worked great. Now, one more question-can I add another arguement
on
the end, where it asks for <4, to ask for <4 but not less than 0?

Thanks,
Susan

"Lars-Ã…ke Aspelin" wrote:

On Mon, 28 Jul 2008 14:21:27 -0700, Susan
wrote:

Thank you. This worked on the first cell. But when I copied to another
cell, and changed the E column requirements (for example, changed EU3 to
771)
the formula returned a 0 result. Any ideas?

Susan

"Lars-Ã…ke Aspelin" wrote:

On Mon, 28 Jul 2008 11:21:18 -0700, Vicki
wrote:

Lars,
I tried this formula and it does not produce the correct answer for
me.
I have two conditions also. I want my formula to compare range
f6:f52 and
g6:g52 on sheet1 for employees who are <=54yo with <=9 yrs of service
and
place my answer which should be 20 on sheet2 b3.
I have tried =Countif(sheet1!f6:f52<=54)-Countif(sheet1!g6:g52<=9);
however,
this produces the wrong anwer as well.
I also tried
=sumproduct(--(sheet1!f6:f52<="54"),--(sheet1!g6:g52<="9")).
This too did not work. This formula produces 47, which is those
employees
under 54 or equal and those employees with yrs of svc under 9yrs or
less
(regardless of age).

Is countif the right formula?
Please help.

"Lars-Ã…ke Aspelin" wrote:

On Mon, 28 Jul 2008 09:49:14 -0700, Susan
wrote:

What I want to do is write a formula that will gather information
from one
column in a different worksheet (same workbook) based on a
condition, then
using the results to further look another column and get results
based on
another condition.
For example, I want to know how many times EU3 appears in column
E, and then
of those appearances then find out how many of those are <4 in
column N.
(How many times does = less than 4? answer is 3

Column:
E F N O P
EU3 0 0 F Y
EE3 15 14 H Y
579 6 4 H Y
EU3 4 3 K Y
EE3 4 3 H Y

Thanks for any help!
Susan




Try these formulas:

=COUNTIF(E1:E100,"=EU3")
for the number of EU3's in (first 100 rows of) column E


=SUMPRODUCT(- -(E1:E100="EU3"),- -(N1:N100<4))
for the number of EU3's that have a value less than 4 in column N

As there are only two EU3 in column E in your sample data, how can
you
expect the result that three of them has a value less than 4 in
column
N? Have I missed anything?

Hope this helps / Lars-Ã…ke



In the COUNTIF formula you should have " " around the condition.
In the SUMPRODUCT formula you should not have any " " around the
value you compare with.

In the example you wrote you had the other way around.

Hope this helps / Lars-Ã…ke



=SUMPRODUCT(- -(""&E1:E100="xxx"),- -(N1:N100<4))

will work also if xxx happens to be a number like 771

Lars-Ã…ke






  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Write a formula using two arrays, across two worksheets

Well, seeing that you are starting with a SUMPRODUCT, why not just include
another term in that function?
--
David Biddulph

"Susan" wrote in message
...
What arguement would I use after <4? An and command?

"David Biddulph" wrote:

Yes, you can.
--
David Biddulph

"Susan" wrote in message
...
Hi, that worked great. Now, one more question-can I add another
arguement
on
the end, where it asks for <4, to ask for <4 but not less than 0?

Thanks,
Susan

"Lars-Åke Aspelin" wrote:

On Mon, 28 Jul 2008 14:21:27 -0700, Susan
wrote:

Thank you. This worked on the first cell. But when I copied to
another
cell, and changed the E column requirements (for example, changed EU3
to
771)
the formula returned a 0 result. Any ideas?

Susan

"Lars-Åke Aspelin" wrote:

On Mon, 28 Jul 2008 11:21:18 -0700, Vicki
wrote:

Lars,
I tried this formula and it does not produce the correct answer
for
me.
I have two conditions also. I want my formula to compare range
f6:f52 and
g6:g52 on sheet1 for employees who are <=54yo with <=9 yrs of
service
and
place my answer which should be 20 on sheet2 b3.
I have tried
=Countif(sheet1!f6:f52<=54)-Countif(sheet1!g6:g52<=9);
however,
this produces the wrong anwer as well.
I also tried
=sumproduct(--(sheet1!f6:f52<="54"),--(sheet1!g6:g52<="9")).
This too did not work. This formula produces 47, which is those
employees
under 54 or equal and those employees with yrs of svc under 9yrs
or
less
(regardless of age).

Is countif the right formula?
Please help.

"Lars-Åke Aspelin" wrote:

On Mon, 28 Jul 2008 09:49:14 -0700, Susan
wrote:

What I want to do is write a formula that will gather
information
from one
column in a different worksheet (same workbook) based on a
condition, then
using the results to further look another column and get
results
based on
another condition.
For example, I want to know how many times EU3 appears in
column
E, and then
of those appearances then find out how many of those are <4 in
column N.
(How many times does = less than 4? answer is 3

Column:
E F N O P
EU3 0 0 F Y
EE3 15 14 H Y
579 6 4 H Y
EU3 4 3 K Y
EE3 4 3 H Y

Thanks for any help!
Susan




Try these formulas:

=COUNTIF(E1:E100,"=EU3")
for the number of EU3's in (first 100 rows of) column E


=SUMPRODUCT(- -(E1:E100="EU3"),- -(N1:N100<4))
for the number of EU3's that have a value less than 4 in column
N

As there are only two EU3 in column E in your sample data, how
can
you
expect the result that three of them has a value less than 4 in
column
N? Have I missed anything?

Hope this helps / Lars-Åke



In the COUNTIF formula you should have " " around the condition.
In the SUMPRODUCT formula you should not have any " " around the
value you compare with.

In the example you wrote you had the other way around.

Hope this helps / Lars-Åke



=SUMPRODUCT(- -(""&E1:E100="xxx"),- -(N1:N100<4))

will work also if xxx happens to be a number like 771

Lars-Åke










  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 271
Default Write a formula using two arrays, across two worksheets

Ok, I'm not very versed on that, can you tell what term to use?

"David Biddulph" wrote:

Well, seeing that you are starting with a SUMPRODUCT, why not just include
another term in that function?
--
David Biddulph

"Susan" wrote in message
...
What arguement would I use after <4? An and command?

"David Biddulph" wrote:

Yes, you can.
--
David Biddulph

"Susan" wrote in message
...
Hi, that worked great. Now, one more question-can I add another
arguement
on
the end, where it asks for <4, to ask for <4 but not less than 0?

Thanks,
Susan

"Lars-Ã…ke Aspelin" wrote:

On Mon, 28 Jul 2008 14:21:27 -0700, Susan
wrote:

Thank you. This worked on the first cell. But when I copied to
another
cell, and changed the E column requirements (for example, changed EU3
to
771)
the formula returned a 0 result. Any ideas?

Susan

"Lars-Ã…ke Aspelin" wrote:

On Mon, 28 Jul 2008 11:21:18 -0700, Vicki
wrote:

Lars,
I tried this formula and it does not produce the correct answer
for
me.
I have two conditions also. I want my formula to compare range
f6:f52 and
g6:g52 on sheet1 for employees who are <=54yo with <=9 yrs of
service
and
place my answer which should be 20 on sheet2 b3.
I have tried
=Countif(sheet1!f6:f52<=54)-Countif(sheet1!g6:g52<=9);
however,
this produces the wrong anwer as well.
I also tried
=sumproduct(--(sheet1!f6:f52<="54"),--(sheet1!g6:g52<="9")).
This too did not work. This formula produces 47, which is those
employees
under 54 or equal and those employees with yrs of svc under 9yrs
or
less
(regardless of age).

Is countif the right formula?
Please help.

"Lars-Ã…ke Aspelin" wrote:

On Mon, 28 Jul 2008 09:49:14 -0700, Susan
wrote:

What I want to do is write a formula that will gather
information
from one
column in a different worksheet (same workbook) based on a
condition, then
using the results to further look another column and get
results
based on
another condition.
For example, I want to know how many times EU3 appears in
column
E, and then
of those appearances then find out how many of those are <4 in
column N.
(How many times does = less than 4? answer is 3

Column:
E F N O P
EU3 0 0 F Y
EE3 15 14 H Y
579 6 4 H Y
EU3 4 3 K Y
EE3 4 3 H Y

Thanks for any help!
Susan




Try these formulas:

=COUNTIF(E1:E100,"=EU3")
for the number of EU3's in (first 100 rows of) column E


=SUMPRODUCT(- -(E1:E100="EU3"),- -(N1:N100<4))
for the number of EU3's that have a value less than 4 in column
N

As there are only two EU3 in column E in your sample data, how
can
you
expect the result that three of them has a value less than 4 in
column
N? Have I missed anything?

Hope this helps / Lars-Ã…ke



In the COUNTIF formula you should have " " around the condition.
In the SUMPRODUCT formula you should not have any " " around the
value you compare with.

In the example you wrote you had the other way around.

Hope this helps / Lars-Ã…ke



=SUMPRODUCT(- -(""&E1:E100="xxx"),- -(N1:N100<4))

will work also if xxx happens to be a number like 771

Lars-Ã…ke









  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Write a formula using two arrays, across two worksheets

Well, you've got ...,--(N1:N100<4)... for your test for column N being less
than 4.

For N being not less than 0 you could use
...,--(NOT(N1:N100<0))...
but you'd be better with
....,--(N1:N100=0)...
--
David Biddulph

"Susan" wrote in message
...
Ok, I'm not very versed on that, can you tell what term to use?

"David Biddulph" wrote:

Well, seeing that you are starting with a SUMPRODUCT, why not just
include
another term in that function?
--
David Biddulph

"Susan" wrote in message
...
What arguement would I use after <4? An and command?

"David Biddulph" wrote:

Yes, you can.
--
David Biddulph

"Susan" wrote in message
...
Hi, that worked great. Now, one more question-can I add another
arguement
on
the end, where it asks for <4, to ask for <4 but not less than 0?

Thanks,
Susan

"Lars-Åke Aspelin" wrote:

On Mon, 28 Jul 2008 14:21:27 -0700, Susan
wrote:

Thank you. This worked on the first cell. But when I copied to
another
cell, and changed the E column requirements (for example, changed
EU3
to
771)
the formula returned a 0 result. Any ideas?

Susan

"Lars-Åke Aspelin" wrote:

On Mon, 28 Jul 2008 11:21:18 -0700, Vicki
wrote:

Lars,
I tried this formula and it does not produce the correct answer
for
me.
I have two conditions also. I want my formula to compare range
f6:f52 and
g6:g52 on sheet1 for employees who are <=54yo with <=9 yrs of
service
and
place my answer which should be 20 on sheet2 b3.
I have tried
=Countif(sheet1!f6:f52<=54)-Countif(sheet1!g6:g52<=9);
however,
this produces the wrong anwer as well.
I also tried
=sumproduct(--(sheet1!f6:f52<="54"),--(sheet1!g6:g52<="9")).
This too did not work. This formula produces 47, which is
those
employees
under 54 or equal and those employees with yrs of svc under
9yrs
or
less
(regardless of age).

Is countif the right formula?
Please help.

"Lars-Åke Aspelin" wrote:

On Mon, 28 Jul 2008 09:49:14 -0700, Susan
wrote:

What I want to do is write a formula that will gather
information
from one
column in a different worksheet (same workbook) based on a
condition, then
using the results to further look another column and get
results
based on
another condition.
For example, I want to know how many times EU3 appears in
column
E, and then
of those appearances then find out how many of those are <4
in
column N.
(How many times does = less than 4? answer is 3

Column:
E F N O P
EU3 0 0 F Y
EE3 15 14 H Y
579 6 4 H Y
EU3 4 3 K Y
EE3 4 3 H Y

Thanks for any help!
Susan




Try these formulas:

=COUNTIF(E1:E100,"=EU3")
for the number of EU3's in (first 100 rows of) column E


=SUMPRODUCT(- -(E1:E100="EU3"),- -(N1:N100<4))
for the number of EU3's that have a value less than 4 in
column
N

As there are only two EU3 in column E in your sample data,
how
can
you
expect the result that three of them has a value less than 4
in
column
N? Have I missed anything?

Hope this helps / Lars-Åke



In the COUNTIF formula you should have " " around the
condition.
In the SUMPRODUCT formula you should not have any " " around
the
value you compare with.

In the example you wrote you had the other way around.

Hope this helps / Lars-Åke



=SUMPRODUCT(- -(""&E1:E100="xxx"),- -(N1:N100<4))

will work also if xxx happens to be a number like 771

Lars-Åke











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
Arrays/Functions/Different datatypes in a formula? Jess Excel Worksheet Functions 3 November 13th 06 10:15 AM
How can I write multidimensional arrays in Excel Formulas? Vasil Ivanov Excel Worksheet Functions 2 September 13th 06 10:58 AM
select lines from multiple worksheets and write to new worksheet rem Excel Worksheet Functions 1 September 15th 05 03:35 PM
Using Vlookup in formula arrays BartDesc Excel Worksheet Functions 4 July 3rd 05 04:42 PM
Arrays, & Worksheets & Grey Hair Peter Excel Discussion (Misc queries) 2 February 13th 05 01:35 AM


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

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

About Us

"It's about Microsoft Excel"