Sum value from dropdown list menu

Vani11

New Member
Joined
Sep 19, 2017
Messages
9
Hi There!

I need some help to sum up the value for drop-down list. Each item in the drop-down list should have a value tagged with it.

This is the scenario:

Subject NameTypeStatusAppointmentIDTime
GENERAL SCREENING OPEN

<colgroup><col><col><col><col><col><col></colgroup><tbody>
</tbody>

Type
-Select'Value
DM0.20
HV0.30
RP DM/HV0.25

<colgroup><col><col></colgroup><tbody>
</tbody>


Above is the table which i have created. When user selects the column "Type", 3 options will be displayed, (DM, HV & RP DM/HV - type of screening subjects). Each time when a user selects the desired option, it should begin to sum up the value that is assigned to each drop-down item. If the sum value is below 1.00, then the text will be displayed as "General Screening Open". If the sum of value is above 1.00 then the text will be changed to "General Screening Closed".

A user is entitled to select any options from the drop-down menu. If the user selects the following:

Subject NameTypeStatusAppointmentIDTime
Subject 1DM
Subject 2HV
Subject 3RP DM/HV
Subject 4 HV
GENERAL SCREENING OPEN

<tbody>
</tbody>

In this case, The total value is 1.05, hence the text should change to "General Screening Closed". The values should starting calculating when each data is entered.

I have tried to use conditional formatting but i did that only by inserting another column to indicate the designated value for each drop-down option. This time, i have tried using lookup function. I understand lookup function can handle only one criteria. Is there a way to handle more than 1 criteria by using index or match function?

Vani
 

Excel Facts

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

If I understand your question correctly the following should work:

Assuming "Type" is in column B:
<style type="text/css">p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Lucida Grande'}span.s1 {color: #006107}span.s2 {color: #ab30d6}span.s3 {color: #0057d6}span.s4 {color: #a54a29}span.s5 {color: #33af4a}</style>=IF(SUM(IF(B2:B10="DM",0.2,IF(B2:10="HV",0.3,IF(B2:B10="RP DM/HV",0.25,0))))>1,"General Screening Closed","General Screening Open")
ctrl+shift+Enter

-Andrew
 
Upvote 0
Type
-Select' Value
DM
0.2
HV
0.3
RP DM/HV
0.25

Select A3:B5 and name it TypeTable in the Name Manager or via the Name Box.

Subject Name Type Status Appointment ID Time
Subject 1 DM
Subject 2 HV
Subject 3 RP DM/HV
Subject 4 HV
GENERAL SCREENING CLOSED

In A11 enter:

="GENERAL SCREENING"&IF(SUMPRODUCT(SUMIFS(INDEX(TypeTable,0,2),INDEX(TypeTable,0,1),B2:B10))>1," CLOSED"," OPEN")
 
Upvote 0
Hi Aladin


Thanks for providing me with the formula. It would be better to explain further. I will need to set the following conditions for the spreadsheet:

IJKLMN
Subject NameTypeStatusAppointmentIDTime
GENERAL SCREENING OPEN
Summary
[0] DM[0] HV[0] RP DM/HV[0] New Subj[0] Existing Subj

<tbody>
</tbody>


1) The text output message "GS Open" or "GS Closed" is dependent on two columns (Type & Status). This time, the text output message is based on calculating the values from the drop-down list of 2 columns (Type & Status).

2) To display "GS CLOSED" - The limit for the value is >=1.00

3) To display "GS Opened" - The limit value is between 0.00 to 0.90.

4) Once the value has reached 0.90, the cell color changes to "Amber" ( I did this using conditional formatting but after using your formula, it did not work)

5) These are the values assigned:

I have used your formula to add in the "Status" column.

="GENERAL SCREENING"&IF(SUMPRODUCT(SUMIFS(INDEX(CountGS,0,3),INDEX(CountGS,0,2)INDEX(CountGS,0,1),J7:J15))>=1," CLOSED"," OPEN")

This did not work.

This table name is CountGS
TypeStatusValue
DMNew0.30
DMExisiting0.25
HVNew0.20
HVExisiting0.20

<tbody>
</tbody>

I have another tab with drop-down values

TypeStatusAppointment
-Select--Select--Select-
DMNewConfirmed
HVExisitingReschedule
Cancelled

<tbody>
</tbody>


6) The next requirement is when the user selects the options, ("Rescheduled" or "Cancelled") from the Appointment Column, the value limit should also be part of calculating whether the General Screening is "Closed" or "Opened"

I am trying not to use VBA coding as it might become very complex. Working on excel formulas at the moment.
 
Upvote 0
Hi, Small adjustment to the equation below. I left out the "B" after the 3rd if statement before the 10. It is included below and underlined:
<style type="text/css">p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Lucida Grande'}span.s1 {color: #006107}span.s2 {color: #ab30d6}span.s3 {color: #0057d6}span.s4 {color: #a54a29}span.s5 {color: #33af4a}</style>=IF(SUM(IF(B2:B10="DM",0.2,IF(B2:B10="HV",0.3,IF(B2:B10="RP DM/HV",0.25,0))))>1,"General Screening Closed","General Screening Open")

Hi Vani,

If I understand your question correctly the following should work:

Assuming "Type" is in column B:
<style type="text/css">p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Lucida Grande'}span.s1 {color: #006107}span.s2 {color: #ab30d6}span.s3 {color: #0057d6}span.s4 {color: #a54a29}span.s5 {color: #33af4a}</style>=IF(SUM(IF(B2:B10="DM",0.2,IF(B2:10="HV",0.3,IF(B2:B10="RP DM/HV",0.25,0))))>1,"General Screening Closed","General Screening Open")
ctrl+shift+Enter

-Andrew
 
Upvote 0
1. With CountGS, we get:

="GENERAL SCREENING"&IF(SUMPRODUCT(SUMIFS(INDEX(CountGS,0,3),INDEX(CountGS,0,2),K7:K15,INDEX(CountGS,0,1),J7:J15))>=1," CLOSED"," OPEN")

2. If you also want to include Appointment...

="GENERAL SCREENING"&IF(SUMPRODUCT(L7:L15,SUMIFS(INDEX(CountGS,0,3),INDEX(CountGS,0,2),K7:K15,INDEX(CountGS,0,1),J7:J15))>=1," CLOSED"," OPEN")

Are we getting the results you intend?
 
Upvote 0
Hi Aladin,

Would there be a way to link a dropdown list value to a user form? The appointment column "D" has drop-down list.

The drop-down list values are:
Confirmed
Rescheduled
Cancelled


If a user selects, "Rescheduled", a pop up form should appear to users to select the following checkboxes:

*Blood Test *Urinalysis * Blood Pressure

Next, when the user mouse over that row of data where the appointment is "rescheduled", it should show the checkbox which the user have selected.

Subject NameTypeResAppointmentIDTime
DM New0.30Confirmed156058:45 AM
0.00
0.00
0.00
0.00
0.00
0.00
0.00

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,215,855
Messages
6,127,349
Members
449,381
Latest member
Aircuart

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