Hi All,
I'm having difficulty working out a way to solve the following issue:
I need to sum the number of vehicle trips which fall within a distance range.
eg
<tbody>
</tbody>
The data I'm considering is 2100 rows deep. The range (start km and end km) can consist of any numbers (user-defined interval/series). I need the formula (or VBA code) to check whether the Distance falls within the range (eg AND(">=5","<5.5")). If the distance falls within the range then the trips need to be added to all the other trips within the range.
The outcome must be the sum of all the trips.
I have tried Sumif(B2:D2, AND(B2:D2">=5",B2:D2"<5.5"), B1:D1)
and Dsum(A1:A4, "Trips", B3:B4)
but to no avail.
I think I need an array formula (CTRL+SHIFT+ENTER) but I'm not sure which functions it needs to include and how to arrange them in such a way that the entire data set is searched (w.r.t. distance) and then the SUM of trips returned.
Any help would be much appreciated
I'm having difficulty working out a way to solve the following issue:
I need to sum the number of vehicle trips which fall within a distance range.
eg
1 | 2 | 3 | 4 | 5 | desired outcome | |
A | Trips | Distance | Range | Sum of trips in range | ||
B | 29.4 | 0 | 5km | 5.5km | ???Formula??? | 0 |
C | 13.7 | 89.2 | 10 | 50 | ---> | 2.7 |
D | 2.7 | 36.1 | 0 | 100 | ---> | (29.4+13.7+2.7)=45.8 |
<tbody>
</tbody>
The data I'm considering is 2100 rows deep. The range (start km and end km) can consist of any numbers (user-defined interval/series). I need the formula (or VBA code) to check whether the Distance falls within the range (eg AND(">=5","<5.5")). If the distance falls within the range then the trips need to be added to all the other trips within the range.
The outcome must be the sum of all the trips.
I have tried Sumif(B2:D2, AND(B2:D2">=5",B2:D2"<5.5"), B1:D1)
and Dsum(A1:A4, "Trips", B3:B4)
but to no avail.
I think I need an array formula (CTRL+SHIFT+ENTER) but I'm not sure which functions it needs to include and how to arrange them in such a way that the entire data set is searched (w.r.t. distance) and then the SUM of trips returned.
Any help would be much appreciated