1
votes

I need to search multiple spreadsheets like this for certain words like "#work" and "#hobbies" and add up the numbers on the adjacent column.

https://docs.google.com/spreadsheets/d/1XRI6PtrTTIPK5wGj6cWaa9puWBjwdMimuxLnIp1sGFE/edit?usp=sharing

In this sheet, I need to add up the values in "Sheet 2" and "Sheet 3", for the cells in column B adjacent to the words "#work" and "#hobbies". After I add them up, I want to put the total for "#work" and "#hobbies" in the cell adjacent to "#work" and "#hobbies" in "Sheet 1".

Essentially I want to assign "Sheet 1!B1"="Sheet 2!B1"+"Sheet 3!B3"

and

"Sheet 1!B4"="Sheet 2!B4"+"Sheet 3!B9"

Since I dont know the location of these words "#work" or "#hobbies" apriori, I need to search in column A, and find out the values and then add them up.

What code or function will help me evaluate this and do this job?

1

1 Answers

0
votes

You could do this with a script bound to the spreadsheet. There isn't a single function that can accomplish what you need. If you want to do this with functions in cells, spend some time getting familiar with the basic capabilities of the functions.

Google Sheet Functions

Take a look at the COUNTIF function:

COUNTIF