Calculate Total Count of hits seen using two references

urban_player

New Member
Joined
Feb 22, 2019
Messages
14
Hi Message Board,

I am seeking advice on the following:

I have a column which contains a reference. The reference may be seen multiple times in different rows. In this row, there is another column which contains a number between 1 and 20. I'm trying to calculate the count of how many times it's seen throughout the sheet using another table:




E.g
Data Sheet looks like
Column A: Column C:
SVA-001 1
SVA-001 4
SVA-002 3
SVA-002 3
SVA-002 5
SVA-002 1
SVA-003 4
SVA-004 6


I have another table that has values from 1 to 20. I need to look in Column A for the reference, and then a countif(?) where column C contains the number in the table that has values from 1-20.

What would be the best way, to achieve a lookup using a reference table containing values 1-20.


Reference: Number of times seen
SVA-001 2
SVA-002 3
SVA-003 1
SVA-004 1

I hope this makes sense and any feedback is greatly appreciated. I might be over thinking this or it's friday and my brain has crashed.

Regards,

Urbanuser
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
try this

Book1
ABCDE
1SVA-0011SVA-0012
2SVA-0014SVA-0024
3SVA-0023SVA-0031
4SVA-0023SVA-0041
5SVA-0025
6SVA-0021
7SVA-0034
8SVA-0046
Sheet2
Cell Formulas
RangeFormula
E1:E4E1=COUNTIF($A$1:$A$8,D1)
 
Upvote 0
Think i might have just sussed it with this ugly looking line
=COUNTIFS('Sheet1'!$A$2:$A$237,'SheetLookup'!C87:C108,'Sheet1'!$B$2:$B$237,">=1",'Sheet1'!$B$2:$B$237,"<=10")

Thanks alot for the quick reply Alan :)
 
Upvote 0
Think i might have just sussed it with this ugly looking line
=COUNTIFS('Sheet1'!$A$2:$A$237,'SheetLookup'!C87:C108,'Sheet1'!$B$2:$B$237,">=1",'Sheet1'!$B$2:$B$237,"<=10")

Thanks alot for the quick reply Alan :)
well, I missed that bit about Col C.
glad that you got t sorted
 
Upvote 0
Hi this function good
VBA Code:
=IF(COUNTIF(A:A,"*SVA-00"&ROWS($A$1:A1)&"*")<>0,"SVA-00"&ROWS($A$1:A1)&" "&COUNTIF(A:A,"*SVA-00"&ROWS($A$1:A1)&"*"),"")
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,251
Members
448,556
Latest member
peterhess2002

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