Countif within a range

MollyElizabeth

New Member
Joined
Feb 25, 2014
Messages
5
I am trying to figure out how to do a countif within a range with 1 addition criteria. I have miles from our facility to our customers. I have already used the following formula to get the total number of trips to the customers within a mileage range for the first 2 months of the year, =SUM(INDEX((Sheet1!$Q$2:$Q$3733>=A3)*(Sheet1!$Q$2:$Q$3733<=B3),0,1)). Now I need to figure out by day of week how many times we are going to to customers within that mileage range. I have already add a column into the raw data that returns the DOW value (1,2,3,4,5,7). I just can't figure out how to add the extra criteria to the countif. An example of what I want to see if for 0-20 miles on a Tueday how many trips did we run.
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
The COUNTIFS works ok, but if the criteria links to a cell the formula won't work. For example, if I enter that <=B3 the only return i ever get is 0. I have to put in as criteria that <=50. I really want to be able to change my ranges easily without having to manually redo every cell, or do a find replace on every cell. Here is an example of what I am trying to create.

Deliveries per Week
Weekly Sales1234567
$0$10,000201001000
$10,000$20,00031940000
$20,000$30,000032122100
$30,000$40,000124174000
$40,000$50,000118217000
$50,000$60,000021112000
$60,000$70,00003714100
$70,000$80,000101411200
$80,000$90,00000109100
$90,000$100,000001210100
$100,000$110,0001036110
$110,000$120,0000025200
$120,000$130,0000054000
$130,000$140,0000006100
>$140,000 0035411

<colgroup><col><col><col span="7"></colgroup><tbody>
</tbody>
 
Upvote 0
The COUNTIFS works ok, but if the criteria links to a cell the formula won't work. For example, if I enter that <=B3 the only return i ever get is 0. I have to put in as criteria that <=50. I really want to be able to change my ranges easily without having to manually redo every cell, or do a find replace on every cell. Here is an example of what I am trying to create.

Deliveries per Week
Weekly Sales
1
2
3
4
5
6
7
$0
$10,000
20
10
1
$10,000
$20,000
3
19
4
$20,000
$30,000
32
12
2
1
$30,000
$40,000
1
24
17
4
$40,000
$50,000
1
18
21
7
$50,000
$60,000
2
11
12
$60,000
$70,000
3
7
14
1
$70,000
$80,000
1
14
11
2
$80,000
$90,000
10
9
1
$90,000
$100,000
12
10
1
$100,000
$110,000
1
3
6
1
1
$110,000
$120,000
2
5
2
$120,000
$130,000
5
4
$130,000
$140,000
6
1
>$140,000
3
5
4
1
1

<tbody>
</tbody>

For the criteria in the countifs try: "<="&B3
 
Upvote 0

Forum statistics

Threads
1,216,099
Messages
6,128,823
Members
449,470
Latest member
Subhash Chand

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top