Translating COUNTIFS in Excel to Google spreadsheets

Silha83

New Member
Joined
Feb 6, 2014
Messages
7
Hello all,

I have used quite a few COUNTIFS formulas in Excel that do not translate into Google spreadsheets. I was wondering if anyone would know how to translate the following formula into Google spreadsheets:

=(COUNTIFS(Permanent!H:H,"=Onsite",Permanent!B:B,"=London"))+(COUNTIFS(Freelance!J:J,"=Onsite",Freelance!B:B,"=London"))

I have two spreadsheets (viz. Permanent & Freelance) and in the above formula I want to calculate the sum total of staff members in London who are onsite.

Any help would be appreciated.

Thank you!
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Hi
Welcome to the board

Try:

=SUMPRODUCT((Permanent!H1:H1000="Onsite")*(Permanent!B1:B1000="London"))+SUMPRODUCT((Freelance!J1:J1000="Onsite")*(Freelance!B1:B1000="London"))

Adjust the number of rows if 1000 is not enough.
 
Upvote 0
Thank you so much!

I tried that but it doesn't return the correct results even when I change the cell range. I read online that you can use array formulas in Google spreadsheets to transfer COUNTIFS from Excel. Would you know about this?
 
Upvote 0
I read online that you can use array formulas in Google spreadsheets to transfer COUNTIFS from Excel. Would you know about this?

Try this version

=Arrayformula(Sum(If(Freelance!J:J="Onsite",IF(Freelance!B:B="London",1))))
 
Upvote 0
Yes, I have tried to update to the new spreadsheets but I think there might be some restrictions on my account or version control as it is a work gmail account, so I can't access the update.
 
Upvote 0
Ooh, thanks Barry Houdini! Only problem is, I want the sum total of onsite Londoners in both the freelance tab (which your formula includes) and also in the permanent tab. Is there a way I can do this?
 
Upvote 0
Just add two together like your original, i.e.

=Arrayformula(Sum(If(Permanent!H:H="Onsite",IF(Permanent!B:B="London",1)))+Sum(If(Freelance!J:J="Onsite",IF(Freelance!B:B="London",1))))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,751
Members
448,989
Latest member
mariah3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top