Hoping to get some help on a rather interesting formula!
- Column A = Start Date
- Column B = End Date
- Column C = # Sales
Goal: create a calculator on the same sheet that allows me to input two dates (Start Date/End Date), and have the output be the sum of all values in Column C within that defined range (see image).
Problem: figuring out a way to have the formula recognize and sum the data in between the rows that are within the data range but not directly equal to the values that define the range (in other words, I can only figure out formulas that sum the first and last rows of the array)
Thanks in advance!! Here’s the link to a sample spreadsheet with sample data: https://docs.google.com/spreadsheets/d/1d3fKGXdvVPFJNJA-TgHbH7t250GS2pQQCWvQC31T5Ow/edit#gid=0
3
Answers
use:
Another option if you want to write SQL:
You can also try using FILTER in combination with sum.
I find this approach nicer since the
SUMIFS
has some strange shorthand.If you use filter you might have an extra column saying the city (e.g. column D would be Dallas or Copenhagen), and then you could filter that also. In your case you would add to the filter,
D2:D14="Dallas"
.I put the code in your shared sheet.
Cheers Mads