Countif Cell equals Active Worsheet

tcnt9176

Board Regular
Joined
Jun 23, 2008
Messages
223
Hello. I need to enter a countif formula if a cell equals the name of the active worksheet and also cell A1. My worksheets are not always the same and I also want to be able to copy this formula to multiple worksheets so if the formula states active worksheet then is should work properly when I past it to multiple tabs (at least in my head).
Thanks. Chris
 
Just to Add to my last post, the following worked. I now need to do this same thing but only where the cell in column C of the Placement Detail equals the name of the active worksheet. Here is the one that works and then the script that I know works for limiting it to claims where column C equals the name of the active worksheet. The problem I am having is combining them. Thanks.

ActiveCell.FormulaR1C1 = _
"=SUMPRODUCT(--('Placement Detail'!C[10]=RC[-1]),--('Placement Detail'!C=9999)) + SUMPRODUCT(--('Placement Detail'!C[10]=RC[-1]),--('Placement Detail'!C=9000))"



--('Placement Detail'!R[-2]C[2]:R[9997]C[2]=RIGHT(CELL(""filename""),LEN(CELL(""filename""))-SEARCH(""]"",CELL(""filename""),1))))"
 
Upvote 0

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

Forum statistics

Threads
1,215,459
Messages
6,124,947
Members
449,198
Latest member
MhammadishaqKhan

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