countif (S)?

WDB2

Board Regular
Joined
Apr 14, 2008
Messages
87
I have a spreadsheet where the data is all on sheet two and I want to get counts onto sheet one.

I want to populate column E on sheet 1 if the criteria matches. I need to therefore enter my formula in column E on sheet one. It needs to say something along the lines of:

If column D on sheet 2 matches cell B2 on sheet 1 and if column F on sheet 2 contains "Sub" then count all items like this and return the value in cell E2. Ideally I also want to build in to say that column L on sheet 2 must have a date in the future as well.
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
I have a spreadsheet where the data is all on sheet two and I want to get counts onto sheet one.

I want to populate column E on sheet 1 if the criteria matches. I need to therefore enter my formula in column E on sheet one. It needs to say something along the lines of:

If column D on sheet 2 matches cell B2 on sheet 1 and if column F on sheet 2 contains "Sub" then count all items like this and return the value in cell E2. Ideally I also want to build in to say that column L on sheet 2 must have a date in the future as well.

On Excel 2007 and beyond...
Rich (BB code):
=COUNTIFS(Sheet2!$D$2:$D$400,B2,Sheet2!$F$2:$F$400,"*Sub*")

With a date test:
Rich (BB code):
=COUNTIFS(Sheet2!$D$2:$D$400,B2,Sheet2!$F$2:$F$400,"*Sub*",
    Sheet2!$L$2:$L$400,"4-Oct-11")
On all versions...
Rich (BB code):
=SUMPRODUCT(--(Sheet2!$D$2:$D$400=B2),
    --ISNUMBER(SEARCH("Sub",Sheet2!$F$2:$F$400))
 
=SUMPRODUCT(--(Sheet2!$D$2:$D$400=B2),
    --ISNUMBER(SEARCH("Sub",Sheet2!$F$2:$F$400),
    --(Sheet2!$L$2:$L$400="4-Oct-11"+0))
 
Upvote 0

Forum statistics

Threads
1,224,592
Messages
6,179,787
Members
452,942
Latest member
VijayNewtoExcel

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