Need your help with formulas in excel!!

M

michelle wilson

I have 2 columns one for type and one for physical. I need to count how many
total but only the counting those that are typed as "ofc" AND with the
physical as "vacant".

I have no idea how to do this PLEASE HELP!!
 
J

JonR

Use an array formula

{=SUM(IF(A1:A30="Vacant",IF(B1:B30="ofc",1,0),0))}


Enter the sum formula as you normally would, and adjust the ranges according
to your needs. To get the brackets around the formula, hold down <Ctrl>,
<Shift>, <Enter>.
 
M

michelle wilson

Yes it did - now if I also need to include I2-I28 = OFC AND H2-H28=VACANT. I
TOOK A WHACK AT ADDING IT BUT I DIDN'T DO SOMETHING RIGHT. UUGGHHH - THANK
YOU SO MUCH FOR YOUR HELP!
 
D

Dave

Hi,
When you say "I also need to include I2-I28 = OFC AND H2-H28=VACANT"
Do you mean that you now have 2 different ranges? One range in Columns A and
B, and another inColumns H and I?

Dave.
 
M

michelle wilson

exactly. For instance I have B2-B28 and H2-H97 for OFC and then C2-C28 and
I2-I97 for VACANT. Thank you again!
 
D

Dave

Hi Michelle,
Then I think it's just a matter of adding them together:

=SUMPRODUCT((B2:B28="ofc")*(C2:C28="vacant"))+SUMPRODUCT((H2:H97="ofc")*(I2:I97="vacant"))

All on one line, of course.

Regards - Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top