Counting total of dropdown

johnrobgray

New Member
Joined
Aug 21, 2017
Messages
43
Office Version
  1. 2013
Platform
  1. Windows
Hi guys

I’m still struggling with this one

I have a sheet that has a column and the cells have a drop down box for selection

I want to put the number of times the drop down is used in a cell as a number, no matter what is selected

So example, if it is chosen 3 times in the cells it would display “3” in a destination cell as a running count. Don’t want to count each individual selection, just the number of times a selection is made

Anyone have any ideas on this one?

Thanks
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Since you gave no details like in what column you will be entering these values and where you want the count put.

This script is assuming you will entering the values in column "H" and the count will be in column "I"

If this is not true modify the portion of the script where it says "H:H"
the results will always go in the next column to the right.

This is an auto sheet event script
Your Workbook must be Macro enabled
To install this code:
Right-click on the sheet tab
Select View Code from the pop-up context menu
Paste the code in the VBA edit window
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("H:H")) Is Nothing Then
If Target.Cells.Count > 1 Or IsEmpty(Target) Then Exit Sub
Target.Offset(, 1).Value = Target.Offset(, 1).Value + 1
End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,455
Messages
6,124,938
Members
449,197
Latest member
k_bs

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