Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9626

Spreadsheet formula to find all matching criteria then subject from cell in row

$
0
0

I have a Google sheets document arranged like so:

Sheet 1:

A        | B   | C
tomatoes | 10  | **SUM**

Sheet 2:

A                   | B        | C
2019-01-01T15:00:00 | tomatoes | 2

On Sheet 1, column C, I would like the sum from all rows in sheet 2 where sheet 2 column B matches sheet 1 column A, subtracted from Sheet 1 column B.

Example: Imagine where Sheet 2 had 3 rows the same as shown above, Sheet 1 would then look like:

Sheet 1:

A        | B   | C
tomatoes | 10  | 4 (10 - 6 = 4)

Viewing all articles
Browse latest Browse all 9626

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>