#1   Report Post  
Becky
 
Posts: n/a
Default 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
  #2   Report Post  
Biff
 
Posts: n/a
Default

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
.

  #3   Report Post  
Becky
 
Posts: n/a
Default

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
.


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



All times are GMT +1. The time now is 04:48 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"