×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Excel combo Box referencing

Excel combo Box referencing

Excel combo Box referencing

(OP)
How do you reference to a combo box, its hard to put into words I will explain what Im doing.

Im making a spreadsheet for a company, they need all there expenses for each day listed and they have several (around 20) catergories ranging from motoring to rent, ext. I need to spreadsheet to look in each combo box and when the box says motoring, I want it to pull the amount payed from the cell next to it and put in into a different page to be totalled.

can anyone help?

THANX
WILL

RE: Excel combo Box referencing

Here is a solution if what you want is just the total for each category.  First off, say this is your data, with a combo box on each row in column B, and column C is the "linked cell" for the combo box selection (you can hide Col C if you want):

               A         B                   C
R1           Amount    Pick A Category    Category
R2             $10       <combo box>        Rent
R3             $15       <combo box>        Motoring
......etc.
R100           $25       <combo box>        Motoring

Next define some names.  Create the name VALUES for the range A2:A100.  Create the name CATS for the range C2:C100.

To compute the total rent, use the following array formula:
=SUM(IF(cats="rent",1,0)*values)
**Remember to press CTRL-SHIFT-ENTER when entering this array formula, which will add the symbols { and } around the formula.
={SUM(IF(cats="cat1",1,0)*values)}
This formula works by "zeroing out" the values for the categories you are not interested in, leaving an array of 1s and 0s multiplied by the array of values, then summing the range of values that remains.

Repeat the above formula for each category.

Hope this helps!

RE: Excel combo Box referencing

Another trick that might work is Data Validation.  
First define the list of options (motoring...rent...???)with a name (Insert - Name - Define) somewhere on one of your worksheets, which can then be hidden.
On the sheet where people enter their expenses, highlight the cells than select Data - Validation...  Under Allow: select list.  For Source: enter =name (whatever name you used previously).  There are options for prompt boxes too.
You can then reference the input cell as with any other. Hopefully you can follow this, I find this approach easier and more user-friendly than adding combo boxes to a worksheet, but hey, whatever works.

RE: Excel combo Box referencing

Similar to first response :
Use combo box from forms toolbar.
Right click, format control, control tab and set up list range and I usually put the cell link to the cell behind the combo box - when they select item 5 on the list, the cell hidden behind the combobox now contains the number 5 (obvious but making sure we're on same wavelength here!).
On next worksheer, or wherever then use the sumif satement to collect all values with value = 5 (say) in the columns containing the combo boxes.
Column A       Column B
<combobox>     Value
<combobox>     Value

To total : =sumif(A1:A10,"=5",B1:B10)
Checks if value in column A is 5, if so, add number in column B to total.

As usual in Excel, many ways to do the same thing. Data validation with list option works just as well except now use the sumif statement with "=motor" or whatever category.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login



News


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close