ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   HELP ON IF (https://www.excelbanter.com/excel-worksheet-functions/9271-help-if.html)

Becky

HELP ON IF
 
I need help. In column A I have a 1=male and 2=female. In column E I have
1=less than 5 yrs, 2=2-5yrs and 3=over 5 yrs. I'm trying to figure out how
many males (1's) have less than 5 yrs (1), 2-5 yrs(2), ect. I've tried the
countif but I keep getting an error. Either that or I get the wrong answer
when I test a couple of cells-help.

Thanks,
Becky

Biff

Hi!

Try this:

=SUMPRODUCT(--(A1:A100=1),--(E1:E100=1))

Or use cell references that hold the values for M or F and
the years.

=SUMPRODUCT(--(A1:A100=B1),--(E1:E100=F1))

Biff

-----Original Message-----
I need help. In column A I have a 1=male and 2=female.

In column E I have
1=less than 5 yrs, 2=2-5yrs and 3=over 5 yrs. I'm trying

to figure out how
many males (1's) have less than 5 yrs (1), 2-5 yrs(2),

ect. I've tried the
countif but I keep getting an error. Either that or I

get the wrong answer
when I test a couple of cells-help.

Thanks,
Becky
.


Becky

Wow, thanks. Maybe the problem before was that I was trying to use "1" (with
quotation marks).
Becky

"Biff" wrote:

Hi!

Try this:

=SUMPRODUCT(--(A1:A100=1),--(E1:E100=1))

Or use cell references that hold the values for M or F and
the years.

=SUMPRODUCT(--(A1:A100=B1),--(E1:E100=F1))

Biff

-----Original Message-----
I need help. In column A I have a 1=male and 2=female.

In column E I have
1=less than 5 yrs, 2=2-5yrs and 3=over 5 yrs. I'm trying

to figure out how
many males (1's) have less than 5 yrs (1), 2-5 yrs(2),

ect. I've tried the
countif but I keep getting an error. Either that or I

get the wrong answer
when I test a couple of cells-help.

Thanks,
Becky
.




All times are GMT +1. The time now is 04:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com