CountIf function on combo-box entries

R

Roxy

We have a 2 column combo box (Active X) set up that shows a procedure code
along with its text name to help users with data entry.

Example:

725.1 Diabetes
546.2 Heart Disease

Would it be possible to do a count if function on the data so see how many
Diabetes cases? It doesn't look like one could filter this either.

Any ideas? My VBA skills are limited. Thanks!!
 
D

Dave Peterson

You could use some code, but maybe easier would be to assign a linkedcell (in a
separate column and hide the column -- or even on a separate (hidden??)
worksheet) to each of those comboboxes.

Then you can use =countif() against that range of linked cells.
 
R

Roxy

I need to verify the steps that I would perform to link a cell to a combo
box... Users will still need to see the combo box so the linked cells
(column) would be hidden. Thanks!!!
 
D

Dave Peterson

Go into design mode (another icon on that control toolbox toolbar)
select a combobox (one at a time!)
Hit the Properties icon
look for linkedcell
type in the address you want to use.

Repeat for each combobox

click on the design mode icon to get back to normal.
 
S

Shane Devenshire

Hi,

Is this combo box entering the data in a spreadsheet range?

If so and that range is A2:A100 you can use the following formula:

=SUMPRODUCT(--ISNUMBER(SEARCH(B1,A$2:A$100)))

in this case you enter Diabeties in cell B1.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top