2 table database count if both databases have a specific range

ohmedic88

Board Regular
Joined
Jun 24, 2013
Messages
124
I need a formula that compares 2 databases and returns a count if both values or within the specific range.

Column A is titles Column B is values The first database is simple the range is <= 0.75
However my second database the value is in between positive 0.5 and Negative 0.5

I need a total count and a count that meets both Database 1 and Database 2 This way I can make a Percentage. So in the below example the total count would be 3 while the Eric and Todd meet both criteria. Emily does not have a value so would not be counted. Greg Fails the first database but passes the second. So on this example I would have a final answer of 66%

Database One <=75
A B
Eric 0.75
Greg 0.76
Todd 0.55
Emily

Database Two +or- .5
A B
Eric 0.5
Greg -0.4
Todd -0.1
Emily

Thanks in advance
 
Last edited:

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Hi and Welcome to the Board,

If your two Databases have the same items in the same order as in your example then you could use the COUNTIFS function as shown below. (If you aren't using Excel 2007 or later, a similar formula with SUMPRODUCT could be used).
Excel Workbook
ABCDE
1Total Count3
2Meets Criteria2
3Ratio66.7%
4
5
6Db1 CriteriaDb2 Criteria
7  
8>=-0.5
9
10Database 1Database 2
11Eric0.75Eric0.5
12Greg0.76Greg-0.4
13Todd0.55Todd-0.1
14EmilyEmily
Sheet


A formula approach becomes much more complex if the two Databases don't have all the same items in the same order.

In that case, consider Joining the two Databases into a third table aligns the data using unique IDs (Titles in this example). Once joined, the formulas above could be applied.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,970
Messages
6,122,514
Members
449,088
Latest member
RandomExceller01

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