Calculating Percentage based on drop down list.

emiliaw.

New Member
Joined
Aug 25, 2011
Messages
16
Hello,

I have created a spreadsheet in Excel with several different columns. Within the columns, I have drop down lists to choose a certain option. There are three options to choose from; UN, NI, and ME. Of the three choices, I need to know what percent is returned ME?

Can anyone help me?

Thank you!!
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Hopefully I got you question.

=COUNTIF($A$2:$A$18,$C$1)/COUNTA($A$2:$A$18)

For this purpose I've put you UN, NI and ME list in column A, your drop down in C1 and the above formula to return percent of selection in D1 (format cell D1 to percentage)

If you could submit what your worksheet looks like I could redo the formula
 
Upvote 0
Perhaps this:-
Assumed that you Drop downs are validation cells.
Code:
[COLOR="Navy"]Sub[/COLOR] MG18Jun12
[COLOR="Navy"]Dim[/COLOR] cl [COLOR="Navy"]As[/COLOR] Range
[COLOR="Navy"]Dim[/COLOR] c [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long[/COLOR]
[COLOR="Navy"]Dim[/COLOR] m [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long[/COLOR]
[COLOR="Navy"]Dim[/COLOR] oRes [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Integer[/COLOR]
[COLOR="Navy"]For[/COLOR] [COLOR="Navy"]Each[/COLOR] cl [COLOR="Navy"]In[/COLOR] UsedRange
    [COLOR="Navy"]On[/COLOR] [COLOR="Navy"]Error[/COLOR] [COLOR="Navy"]Resume[/COLOR] [COLOR="Navy"]Next[/COLOR]
        oRes = 0
            oRes = cl.Validation.Type
[COLOR="Navy"]If[/COLOR] oRes > 0 [COLOR="Navy"]Then[/COLOR]
    c = c + 1
    [COLOR="Navy"]If[/COLOR] cl = "ME" [COLOR="Navy"]Then[/COLOR] m = m + 1
[COLOR="Navy"]End[/COLOR] If
[COLOR="Navy"]Next[/COLOR] cl
MsgBox Format(m / c, "0.00%")
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]
Regards Mick
 
Upvote 0

Forum statistics

Threads
1,211,886
Messages
6,104,581
Members
447,917
Latest member
cbacba

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