Using countif and counta together

simoneasy

New Member
Joined
Jan 31, 2018
Messages
4
I am having difficulties in finding the right formula to return a number of completed tasks. I am working on 2 sheets, the first is an overview sheet giving a headline of outstanding and completed tasks for individual projects. The second sheet is a full task list for each project.

I want to get a number for how many tasks have been completed for a particular project. I have successfully created the formula for getting the count on the individual projects, however, I am struggling to get a formula that says 'if the project name in column A:A is "x" and there is a date in column B:B, then count it and return the total of dates counted into this cell.

I have included a couple of tables below to help explain a little more. The top one is the overview sheet and the bottom one is the individual task sheet. I haven't included all columns on the sheet, but only the ones which I want to get the data from.

[TABLE="width: 500"]
<tbody>[TR]
[TD]Project Name[/TD]
[TD]Total Tasks[/TD]
[TD]Completed Tasks[/TD]
[/TR]
[TR]
[TD]Project 1[/TD]
[TD]=countif(sheetname!$A:$A, A1)[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Project 2[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


[TABLE="width: 500"]
<tbody>[TR]
[TD]Project Name[/TD]
[TD]Completed Date[/TD]
[/TR]
[TR]
[TD]Project 1[/TD]
[TD]31/01/18[/TD]
[/TR]
[TR]
[TD]Project 1[/TD]
[TD]31/01/18[/TD]
[/TR]
[TR]
[TD]Project 2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Project 2[/TD]
[TD]31/01/18[/TD]
[/TR]
</tbody>[/TABLE]

In essence, I would need the overview sheet to show 2 completed tasks for Project 1 and 1 completed task for Project 2.

I hope I have explained that well enough for you to understand, but please feel free to ask any questions.

Thank you very much.

Simon
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
In principle, something like this . . .

=COUNTIFS(A:A,"X",B:B,">0")

You might need to tweak the details
 
Upvote 0
Thanks Gerald, I have tried it and at least I am not getting an error this time, although it only returns a value of 1, where there is 2 cells filled with data. Do you know if I can upload the excel file here so you can see the document?
 
Upvote 0
Ignore me Gerald, I have managed to make it work now.

Thank you for your assistance, really appreciate it!
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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