cant figure out how to return correct number

rlleblan1

New Member
Joined
Sep 18, 2018
Messages
11
Office Version
  1. 365
Platform
  1. Windows
I want to create a function that will combine the functions below and return the number of cells that meet the first formula and also the adjacent cell meets the second formula.

1. =COUNTIFS(Sheet1!A1:ZZ494,">="&B4,Sheet1!A1:ZZ494,"<="&D4)+COUNTIFS(Sheet2!A1:ZZ494,">="&B4,Sheet2!A1:ZZ494,"<="&D4)+COUNTIFS(Sheet3!A1:ZZ494,">="&B4,Sheet3!A1:ZZ494,"<="&D4)+COUNTIFS(Sheet4!A1:ZZ494,">="&B4,Sheet4!A1:ZZ494,"<="&D4)+COUNTIFS('Target account related contact '!A1:ZZ494,">="&B4,'Target account related contact '!A1:ZZ494,"<="&D4)


***** B4 and D4 are dates user can change

2. =COUNTIF(Sheet1!AI:AAB,A9)+COUNTIF(Sheet2!AI:AAD,A9)+COUNTIF(Sheet3!AI:AAA,A9)+COUNTIF(Sheet4!AI:ZZ,A9) +COUNTIF('Target account related contact '!AI:ZZ,A9)

****** A9 refers to a cell with specific word

If cell in workbook matches value between B4 and B5, dates inputted by user, look at adjacent cell and if it matches value in A9 count.

Thanks in advance for assistance.
 

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,279
Messages
6,124,030
Members
449,139
Latest member
sramesh1024

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