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

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,223,898
Messages
6,175,272
Members
452,628
Latest member
dd2

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