Drop Down Validation and Values

lukapsu

New Member
Joined
Jan 27, 2005
Messages
7
Hi, I'm creating a service estimator with drop-down Data Validations.
Based on the user input, the estimator will spit out total amount of hours needed to complete the project.
For example; One of the questions is "DB Type". The two possible drop-down options are SQL or Paradox. If the user selects SQL, that's 8 hours of profesional services. If the user selects Paradox, that's worth 4 hours.
If it's a "Centralized Install" that's 8 hours, if it's "De-Centralized" that's 16 hours. etc.
I have about 10-15 questions like this in the entire worksheet.

I need to know how to assign 8 hrs for the SQL selection, and 4 hours for the Paradox selection. Or 8 hrs to the "Centralized" and 16 hours to "De-Centralized"
At the bottom of the worksheet, I will have a cell that will display TOTAL amount of hours needed for the project based on all of the entries.
Any help would be greatly appreciated.
Thanks in advance.
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

Brian from Maui

MrExcel MVP
Joined
Feb 16, 2002
Messages
8,459
lukapsu said:
Hi, I'm creating a service estimator with drop-down Data Validations.
Based on the user input, the estimator will spit out total amount of hours needed to complete the project.
For example; One of the questions is "DB Type". The two possible drop-down options are SQL or Paradox. If the user selects SQL, that's 8 hours of profesional services. If the user selects Paradox, that's worth 4 hours.
If it's a "Centralized Install" that's 8 hours, if it's "De-Centralized" that's 16 hours. etc.
I have about 10-15 questions like this in the entire worksheet.

I need to know how to assign 8 hrs for the SQL selection, and 4 hours for the Paradox selection. Or 8 hrs to the "Centralized" and 16 hours to "De-Centralized"
At the bottom of the worksheet, I will have a cell that will display TOTAL amount of hours needed for the project based on all of the entries.
Any help would be greatly appreciated.
Thanks in advance.

Create a two column table with options and associated hours. Name the two column table, as an example Hours. Then using Data Validation, in the Allow window, select List and in the Source window enter,

=INDEX(Hours,0,1)

Then use Vlookup as in,

=VLOOKUP(HOURS,2,0)
 

Brian from Maui

MrExcel MVP
Joined
Feb 16, 2002
Messages
8,459
Brian from Maui said:
Create a two column table with options and associated hours. Name the two column table, as an example Hours. Then using Data Validation, in the Allow window, select List and in the Source window enter,

=INDEX(Hours,0,1)

Then use Vlookup as in,

=VLOOKUP(HOURS,2,0)

I've neglected to add a lookup value in the formula,

=VLOOKUP(A1,HOURS,2,0)

Where A1 houses the drop down from Data Validation...... :oops:
 

lukapsu

New Member
Joined
Jan 27, 2005
Messages
7
Awesome!!!
Thanks Brian from Maui!!! I'll be playing with it later today.
I appreciate your help.
 

lukapsu

New Member
Joined
Jan 27, 2005
Messages
7

ADVERTISEMENT

This is my farmula; =VLOOKUP(DBtype,DBHours,2,0)
Where DBtype is the reference for the Data Validation table (two options SQL, Paradox), DBHours is the reference for the two columns of data (Paradox, SQL in A2 & A3, & 4 (hrs), 8 in B2 & B3).
2 is the 2nd Column where the 4 & 8 live, and 0 to return the reference for the entire row.
The DBType & DBHours are in the same workbook, different worksheet.
I get a #Value! error when plugging it in.
Any ideas?
 

Brian from Maui

MrExcel MVP
Joined
Feb 16, 2002
Messages
8,459
lukapsu said:
This is my farmula; =VLOOKUP(DBtype,DBHours,2,0)
Where DBtype is the reference for the Data Validation table (two options SQL, Paradox), DBHours is the reference for the two columns of data (Paradox, SQL in A2 & A3, & 4 (hrs), 8 in B2 & B3).
2 is the 2nd Column where the 4 & 8 live, and 0 to return the reference for the entire row.
The DBType & DBHours are in the same workbook, different worksheet.
I get a #Value! error when plugging it in.
Any ideas?

DBtype should be the CELL which houses the Data Validation
 

lukapsu

New Member
Joined
Jan 27, 2005
Messages
7

ADVERTISEMENT

Got It!!! Thanks, works great.
This is what I have now;
=VLOOKUP(B7,DBHours,2,0)+VLOOKUP(B8,EmpHours,2,0)+VLOOKUP(B9,WebSuiteHours,2,0)

The formula now combines 3 questions, and displays the amount of hours needed for the project.

Here is one more issue I'm running into;
For the question DB Type, the user selects SQL, which gives 8 hrs.
The next question is EmpHours. If I don't select an option from the Data Validation drop down, the =VLOOKUP formula returns #N/A.
How can VLOOKUP calculate hours for the questions that are answered, and by-pass the questions (cells) that are left blank?

Thanks Brian.
 

Brian from Maui

MrExcel MVP
Joined
Feb 16, 2002
Messages
8,459
lukapsu said:
Got It!!! Thanks, works great.
This is what I have now;
=VLOOKUP(B7,DBHours,2,0)+VLOOKUP(B8,EmpHours,2,0)+VLOOKUP(B9,WebSuiteHours,2,0)

The formula now combines 3 questions, and displays the amount of hours needed for the project.

Here is one more issue I'm running into;
For the question DB Type, the user selects SQL, which gives 8 hrs.
The next question is EmpHours. If I don't select an option from the Data Validation drop down, the =VLOOKUP formula returns #N/A.
How can VLOOKUP calculate hours for the questions that are answered, and by-pass the questions (cells) that are left blank?

Thanks Brian.

Filter with an IF,

=IF(B7="","",VLOOKUP(B7,DBHOURS,2,0))
 

lukapsu

New Member
Joined
Jan 27, 2005
Messages
7
This is what I have;

=IF(B7="","",VLOOKUP(B7,DBHours,2,0))+VLOOKUP(B8,EmpHours,2,0)+VLOOKUP(B9,WebSuiteHours,2,0)+VLOOKUP(B10,OrgNoHours,2,0)+VLOOKUP(B11,SuperNoHours,2,0)

I get a #VALUE! error.
Please HELP!!!
 

Brian from Maui

MrExcel MVP
Joined
Feb 16, 2002
Messages
8,459
lukapsu said:
This is what I have;

=IF(B7="","",VLOOKUP(B7,DBHours,2,0))+VLOOKUP(B8,EmpHours,2,0)+VLOOKUP(B9,WebSuiteHours,2,0)+VLOOKUP(B10,OrgNoHours,2,0)+VLOOKUP(B11,SuperNoHours,2,0)

I get a #VALUE! error.
Please HELP!!!

Instead of stringing the Vlookup formula, why don't you enter the formulas in separate cells then use a SUM or SUMIF

=SUMIF(RANGE,"<>#N/A")

or add the IF to every Vlookup formula, not only the first one.
 

Forum statistics

Threads
1,147,845
Messages
5,743,513
Members
423,801
Latest member
paulj4177

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
Top