Simple formula ?

fireslguk

Active Member
Joined
Nov 11, 2005
Messages
305
I have a table with column a:a dates
Column b with status codes e.g W

I want to produce a report on the total number of say “W” in a set period

So for example

1/1/18 until 30/1/18. Equals 4
1/2/18 until 28/2/18. Equals 1

And so on.

The formula on a different sheet looking at tab “2018-2019”
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
You need a COUNTIFS. It is a fairly simple formula. Something like:

=COUNTIFS(B:B,"W",A:A,">="&date1,A:A,"<="&date2)

Replace date1 and date2 with cell references that contain your dates in question.
 
Upvote 0
Paste your formula.

Funny things happening lol

I discovered blank cells no dates of that makes a difference in the A:A column so put some in - can cells be blank ?


After dragging the auto fill this copied the formula however returned all zeros, then when I clicked on the formula bar and pressed enter the formula worked and returned a number so not sure why the auto fill did that
 
Upvote 0
make sure each cell is pointing to the right range. you have to make a new table

W E R T Y
date1 date2
date date
date date

C2 =COUNTIFS(Sheet1!B:B,B$1,Sheet1!A:A,">=A$2,Sheet1!A:A,"<=B$2)

drag down and across. check for changes
 
Upvote 0
All sorted now, was someone else’s sheet and I didn’t realise they had on calculation manual !!
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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