I have a sheet that IMPORTRANGE
's data from another spreadsheet, which contains a column with numerical values that are of type string. In another sheet I am trying to sum the values in that column using SUMIF
. The command is the following:
=SUMIF(Transactions!G2:G, "Food & Dining", ARRAYFORMULA(VALUE(Transactions!D2:D)))
Where column G
contains text to check, and column D
contains the numbers of type string. Of course, I need those values to be numbers to sum them up, so I added the ARRAYFORMULA(VALUE(...))
to try to make it a range, but it tells me that the "Argument must be a range". I'm fairly new to Google Sheets, so I'm confused as to why doesn't it consider this a valid range? When I use that ARRAYFORMULA(VALUE(...))
command on its own it returns a range of values, so how come in SUMIF
its not valid? Is there a way to achieve this, or maybe some easier way by adding a rule that every cell in D
be converted to a number?
VALUES
of the data in your range are not contained in an actual range of the spreadsheet,SUMIF
doesn't "know" what to do with them. As you haven't shared a link to the spreadsheet, that's as much specific information as I can provide.