Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
JLyons
 
Posts: n/a
Default Working with IF functions

I am trying to ad onto an IF formula and I need help. I am using this formula
to count the number of apartments that are vacant. Some apartments have
illegal tenants (squatters). The formula below counts how many are "vacant"
or have "squatters", where squatters replaces vacant.

The formula is: =COUNTIF(C2:C56,"Vacant")

Now I need to count how many 1, 2, and 3 bedroom apartments are either
vacant or have squatters. The D column shows either a 1 for 1 bedroom
apartment, 2 for a 2 bedroom apartment, or 3 for a 3 bedroom apartment.

I tried =COUNTIF(C2:C56,"Vacant",D2:D56) but it did not.

What am I doing wrong.

Thanks for any help out there
  #2   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

Try

=SUMPRODUCT(--(C2:C56="Vacant"),--(D2:D56=1))

for one-bedroom apartments

Regards,

Peo Sjoblom



"JLyons" wrote in message
...
I am trying to ad onto an IF formula and I need help. I am using this

formula
to count the number of apartments that are vacant. Some apartments have
illegal tenants (squatters). The formula below counts how many are

"vacant"
or have "squatters", where squatters replaces vacant.

The formula is: =COUNTIF(C2:C56,"Vacant")

Now I need to count how many 1, 2, and 3 bedroom apartments are either
vacant or have squatters. The D column shows either a 1 for 1 bedroom
apartment, 2 for a 2 bedroom apartment, or 3 for a 3 bedroom apartment.

I tried =COUNTIF(C2:C56,"Vacant",D2:D56) but it did not.

What am I doing wrong.

Thanks for any help out there



  #3   Report Post  
Bob Phillips
 
Posts: n/a
Default

For OR, use

=SUMPRODUCT(--((C2:C56="Vacant")+(C2:C56="Squatters")),--(D2:D56=1))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Peo Sjoblom" wrote in message
...
Try

=SUMPRODUCT(--(C2:C56="Vacant"),--(D2:D56=1))

for one-bedroom apartments

Regards,

Peo Sjoblom



"JLyons" wrote in message
...
I am trying to ad onto an IF formula and I need help. I am using this

formula
to count the number of apartments that are vacant. Some apartments have
illegal tenants (squatters). The formula below counts how many are

"vacant"
or have "squatters", where squatters replaces vacant.

The formula is: =COUNTIF(C2:C56,"Vacant")

Now I need to count how many 1, 2, and 3 bedroom apartments are either
vacant or have squatters. The D column shows either a 1 for 1 bedroom
apartment, 2 for a 2 bedroom apartment, or 3 for a 3 bedroom apartment.

I tried =COUNTIF(C2:C56,"Vacant",D2:D56) but it did not.

What am I doing wrong.

Thanks for any help out there





  #4   Report Post  
CLR
 
Posts: n/a
Default

You might also want to take a look at the "Data Filter AutoFilter"...
function to study your data.........it will filter out to display only the
rows you're interested in............

Vaya con Dios,
Chuck, CABGx3


"JLyons" wrote in message
...
I am trying to ad onto an IF formula and I need help. I am using this

formula
to count the number of apartments that are vacant. Some apartments have
illegal tenants (squatters). The formula below counts how many are

"vacant"
or have "squatters", where squatters replaces vacant.

The formula is: =COUNTIF(C2:C56,"Vacant")

Now I need to count how many 1, 2, and 3 bedroom apartments are either
vacant or have squatters. The D column shows either a 1 for 1 bedroom
apartment, 2 for a 2 bedroom apartment, or 3 for a 3 bedroom apartment.

I tried =COUNTIF(C2:C56,"Vacant",D2:D56) but it did not.

What am I doing wrong.

Thanks for any help out there



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
Application.Volatile not working as expected Richards Excel Discussion (Misc queries) 3 February 3rd 05 12:20 AM
# of Functions per cell SUB-ZERO Excel Worksheet Functions 3 January 23rd 05 10:35 PM
# of Functions per cell >> More SUB-ZERO Excel Worksheet Functions 0 January 23rd 05 01:07 AM
PivotTable canned functions doco Excel Discussion (Misc queries) 0 January 14th 05 03:52 PM
< and > functions aren"t working for me Dock Buddy Excel Worksheet Functions 6 November 4th 04 03:29 PM


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