Forum Discussion
Finding count of item between number ranges between two tables
- Oct 03, 2021
@t would have been helpful if you had a sample file with perhaps a dozen rows and the desired results from the formula.
Based on my understanding of the question, you are probably wanting a COUNTIFS formula that matches the SCAC and counts the number of rows where the car # is within the from and to range.
In my test workbook, I named the worksheets UniqueRows and EquipmentList. UniqueRows column A is SCAC, column F is the From and column G is the To. EquipmentList column A is SCAC and column B is the car #.
I put the following formula in UniqueRows cell I2 and copied it down.
=COUNTIFS(EquipmentList!A:A,A2,EquipmentList!B:B,">=" & F2,EquipmentList!B:B,"<=" & G2)
@t would have been helpful if you had a sample file with perhaps a dozen rows and the desired results from the formula.
Based on my understanding of the question, you are probably wanting a COUNTIFS formula that matches the SCAC and counts the number of rows where the car # is within the from and to range.
In my test workbook, I named the worksheets UniqueRows and EquipmentList. UniqueRows column A is SCAC, column F is the From and column G is the To. EquipmentList column A is SCAC and column B is the car #.
I put the following formula in UniqueRows cell I2 and copied it down.
=COUNTIFS(EquipmentList!A:A,A2,EquipmentList!B:B,">=" & F2,EquipmentList!B:B,"<=" & G2)