excellerants
New Member
- Joined
- Oct 21, 2020
- Messages
- 1
- Office Version
- 2013
Hi All,
I'm trying to solve the following problem using some combination of sumproduct, sumif, and countif functions: I have a dataset where people move into and out of areas at different times. Sometimes there are multiple people in an area at a time, other times there are none. Each area has a value associated with it.
I am trying to calculate the the sum of the values of each distinct area at successive time intervals if that area had at least one person in it at that time. I have attached a brief fictitious example and have manually calculated the correct result next to the cells with question marks.
My thinking so far has been to use a technique combining SUMPRODUCT with 1/COUNTIF to control for duplicate values, a technique documented on ExcelJet article Count unique values in a range with COUNTIF. However, I haven't been able to successfully apply the time constraints to this formula.
Any help is immensely appreciated!
I'm trying to solve the following problem using some combination of sumproduct, sumif, and countif functions: I have a dataset where people move into and out of areas at different times. Sometimes there are multiple people in an area at a time, other times there are none. Each area has a value associated with it.
I am trying to calculate the the sum of the values of each distinct area at successive time intervals if that area had at least one person in it at that time. I have attached a brief fictitious example and have manually calculated the correct result next to the cells with question marks.
My thinking so far has been to use a technique combining SUMPRODUCT with 1/COUNTIF to control for duplicate values, a technique documented on ExcelJet article Count unique values in a range with COUNTIF. However, I haven't been able to successfully apply the time constraints to this formula.
Any help is immensely appreciated!
Salesperson | State | Potential of State | Begin Date in State | End Date in State |
Olivia | Washington | 26 | April 1, 2020 | April 2, 2020 |
Olivia | California | 71 | April 3, 2020 | April 7, 2020 |
Olivia | Texas | 104 | April 8, 2020 | April 10, 2020 |
Carson | Oregon | 16 | April 1, 2020 | April 1, 2020 |
Carson | Washington | 26 | April 2, 2020 | April 4, 2020 |
Carson | California | 71 | April 5, 2020 | April 6, 2020 |
Carson | Utah | 12 | April 7, 2020 | April 9, 2020 |
Carson | Texas | 104 | April 10, 2020 | April 10, 2020 |
Jazmine | Nevada | 24 | April 1, 2020 | April 4, 2020 |
Jazmine | Utah | 12 | April 5, 2020 | April 10, 2020 |
Enrique | Oregon | 16 | April 1, 2020 | April 4, 2020 |
Enrique | Montana | 0 | April 5, 2020 | April 6, 2020 |
Enrique | Nevada | 24 | April 7, 2020 | April 10, 2020 |
Date | Potential of States | Correct Answer Should Be: |
April 1, 2020 | ? | 66 |
April 2, 2020 | ? | 66 |
April 3, 2020 | ? | 137 |
April 4, 2020 | ? | 137 |
April 5, 2020 | ? | 83 |
April 6, 2020 | ? | 83 |
April 7, 2020 | ? | 107 |
April 8, 2020 | ? | 140 |
April 9, 2020 | ? | 140 |
April 10, 2020 | ? | 140 |