Google Sheets: SUMIF returns "Argument must be a range" error

Michelleaneous

New Member
Joined
Feb 16, 2024
Messages
9
Office Version
  1. 365
Platform
  1. Windows
The aim is to get the sum from another file based on a criteria from the "main" sheet. Importrange function was used to retrieve data from the other file (see formula below) but it will give an error message: "Argument must be a range"

Excel Formula:
=SUMIF(IMPORTRANGE("https://docs.google.com/spreadsheets/d/1iKwpbmnGuNBk7QJwi3m6RyKZXZ3fWexK/edit#gid=1466490795","Sheet1!A2:A"),B43,IMPORTRANGE("https://docs.google.com/spreadsheets/d/1iKwpbmnGuNBk7QJwi3m6RyKZXZ3fWexK/edit#gid=1466490795","Sheet1!E2:E))"))
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
this may not be relavant, as not sure of the importrange
BUT
you have
"Sheet1!A2:A"
so not a range
"Sheet1!A2:A10000"
is a range - is that why you have the error

"Argument must be a range"​

 
Upvote 0
this may not be relavant, as not sure of the importrange
BUT
you have
"Sheet1!A2:A"
so not a range
"Sheet1!A2:A10000"
is a range - is that why you have the error

"Argument must be a range"​

updated the range as suggested above but still get the same error
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,959
Members
449,096
Latest member
Anshu121

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