+ Reply to Thread
Results 1 to 35 of 35

Spread Sheet Formulas and Drop Down

  1. #1
    Registered User
    Join Date
    05-13-2008
    Posts
    19

    Spread Sheet Formulas and Drop Down

    Hello All,

    I consider myself pretty good with excel, but there are still areas that I am not very good in. Today I was tasked to create a sheet that would allow lower units to request orders. In the sheet my boss wanted to see the cost per soldier we put on orders. That comes from the cost of roundtrip travel and how many days they will be getting paid. That is based off their rank. My problem is this, I am attaching the sheet. I created a workbook with two sheets. The first sheet is the actual sheet they will put the information, I hope to have it figure everything also. In that sheet is a column for Rank. I would like to have a drop down menu for that, I have tried but cannot get it to work. I would also like when someone selects a rank it automatically populates the next column which is "1 UTA". So what I am trying to do is this. Say the persons rank is E7, when they select that from the drop down, the next column automatically populates how much they make for one uta. On my second sheet I have the ranks and the amount they get paid for one uta. If someone could tell me how to do this, I can do the basic math to get a total. I am attaching the sheet. please fell free to e-mail me directly at [email protected] any help is greatly appreciated, or call at 785-274-1547, as you can guess I am in the military. Thanks for any help.

    MarK
    Attached Files Attached Files

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    You need to use Data validation see-

    http://www.excel-it.com/data_validation.htm

    Then use VLOOKUP to get the corresponding cost
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,493
    Hi,
    You need to name the range with the list, then in data validation, in the source box type =list
    I have attached an example with the vlookup formula
    Attached Files Attached Files

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    See attached...

    First I defined a named range by going to Insert|Name|Define and naming the range ='Rank & Pay Rate'!$C$4:$D$23 as "Ranks"

    Then I selected cell K4 and went to Data|Validation, chose List and entered formula: =INDEX(Ranks,,1)

    Then in L4, I entered formula : =VLOOKUP(K4,Ranks,2,0)

    To copy the validation down, select K4 and copy, then select rest of range and go to Edit|Paste Special and select Validation.

    To copy down formula, drag the little black square at the bottom right of the cell down as far as you need.
    Attached Files Attached Files
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Well....I guess you know what to do now..

  6. #6
    Registered User
    Join Date
    05-13-2008
    Posts
    19

    Thanks Everyone

    Wow what a response, I didn't expect that at all. Thanks so much. I tried following a lot of the instructions given, and still cannot get it to work. I think I may be doing something wrong. This is something I have always wanted to learn. I work with excel tons, but never to the degree of doing vlook up. I am going to add some more things and send what I got. I will try this with the instructions, wish me luck, if I run into a snag will post. Have to have this done today, so will be posting what I come up with. Thanks

  7. #7
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Take a look at the inventory sheet here

    http://www.excel-it.com/workbook_downloads.htm

    It uses VLOOKUP with Data validation.

  8. #8
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Just found this example of some LOOKUP Functions in my files
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    05-13-2008
    Posts
    19

    Still Trying Need Help

    Okay I have been playing around with this all day. I set up a test page and got it to work. The issue I am having is that I cannot get a drop down menu to show up under account #. I did the validation, list but it will not let me select the field on accounts page. see attached. On my accounts sheet I have setup the vlookup so when you type a account number it automatically shows the name and location. I want a drop down menu of the account numbers from the accounts sheet to show. I can do a drop down on the accounts sheet, but when I copy the drop down to the invoice page it drops down with blank data. see attached
    Attached Files Attached Files

  10. #10
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127
    Create a named range on the ACCOUNTS page highlighting only the account numbers you want to add in the "Refers to" dialog box.

    Next, on the invoice sheet, add the data validation to the correct column. In the Allow: dropdown, choose list. In the source box, type =Accounts (or whatever you named your range)

    Let me know if that helps.

  11. #11
    Registered User
    Join Date
    05-13-2008
    Posts
    19

    Rock On

    It worked, only 5 hours and 2 broken laptops and I did it. Thanks man. I am going to keep playing around with this. There is so much I can use this for in my job, its like a new toy. Thanks

  12. #12
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127
    Feel free to ask questions as you deem them necessary. There is no need to spend 5 hours and break 2 laptops if we can help you out!

  13. #13
    Registered User
    Join Date
    05-13-2008
    Posts
    19

    Okay New Problem

    Okay I have created another work book. There are two sheet, one is the Pay Chart, the other is the pay calculator. Now I am at a point I am getting confused again. I want a person to be able to hit a drop down menu for the grade on the pay calculator page, then hit another drop down bar for the years in service. When they select the years in service I want that to refer to the rank and give the amount of money they would recieve in the UTA column. More or less I want Joe Shmoe to be able to select the grade of a person, then how much time they have in and then for it to automatically show how much that person makes. I hope that makes sense. the problem I have is I don't know to do this. Any help would be awesome. Thanks
    Attached Files Attached Files

  14. #14
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127
    Try this sample file and see if it helps:
    Attached Files Attached Files

  15. #15
    Registered User
    Join Date
    05-13-2008
    Posts
    19

    Wow

    Okay, I would have to say I am floored. When I did the first vlookup I used the wizard after I figured out where that was. How did you do this? Can it be done with the wizard? Thanks a ton, that is exactly what I wanted, it rocks. Thanks, if you have time some time, could you explain the steps. Thanks

  16. #16
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127
    In theory this could be done with the wizard. In practice, it is not very practical.

    Basically, it is a nested function (a function within a function). The INDEX function basically picks a value based on location. There are 3 arguments:
    1. Range to choose from
    2. Row Index
    3. Column Index

    For example, if you had a formula like this: INDEX(A1:B10,4,1), Excel would choose the 4th row down, and the first column, or in this case, the value in cell A4. The MATCH portion of the function give a place value based on matching. For example, MATCH(A1,B1:B10,0) would search through B1:B10 for the value of A1 (the zero at the end indicates that it must be an exact match). Excel then returns the place of A1 in the range. For example, if B4 matches A1, the answer would be 4. From there, you just piece the functions within each other.

  17. #17
    Registered User
    Join Date
    05-13-2008
    Posts
    19

    Need Your Help Again

    Okay please see if you can help me with this. I almost have it complete. Need help with one last thing. On the pay calculator sheet...highlighted in yellow are three columns. I want a drop down bar that refers to the data on the sheet called per diem. The drop down bar should list the locations then once a person selects the location, it should auto populate the other two columns highlighted in yellow...hotel per diem and meal rate, based off the location. I have tried but cannot get it to work. Thanks, see attached.
    Attached Files Attached Files

  18. #18
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    See attached...

    I named the per diam range as PerDiam.... and used Data Validation >> List to list the first column of items... Then the Vlookup() formulas use the PerDiem named range to retrieve corresponding values.

    Note... I cleaned up some of you other formulas so that you didn't have all those #VALUE! errors... I basically replaced where you inserted a "" when no value is available... I changed it to return a 0... then I reformatted your $ values as Accounting with $ symbol so that 0's are returned as "-".

    Also.. in your =Sum(X*Y) formulas the SUM() is reduntant and you only need =X*Y.
    Attached Files Attached Files

  19. #19
    Registered User
    Join Date
    05-13-2008
    Posts
    19

    Thanks and One Last Thing

    Thanks a ton!!!! I showed it to my boss and he says "thanks", but he said I was missing one thing. He said I needed to extend the range for the years in service, since the guard allows people to stay in till their 60, we get a lot of people that have over 26.00 years of service. not that the pay changes to much, but there is a difference. I went in and hand jammed the years from where I left off on the pay chart, they are highlighted yellow. I then went to the pay calculator, and tried to redo the formulas, but ended up getting error after error. All I need is this. On the pay calculator, when you hit the years in service it needs to show the new years added to the pay chart, which are highlighted yellow. More or less, I just need it to work the same with the additional refernce fields on the pay chart added in. So when I select on the pay chart Rank = E7, and Years =40, it will show the pay he will receive. Right now the years only go to 26, I need that extended to the new data on the pay chart. Thanks see attached
    Attached Files Attached Files

  20. #20
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    See attached:

    I just made the Scale, Years and Rank named ranges Dynamic....
    Attached Files Attached Files

  21. #21
    Registered User
    Join Date
    05-13-2008
    Posts
    19

    Smile Thanks

    Its awesome and serves the purpose. I still wish I could get a better understanding of how to do it. I know I can, I am just one of those people that has to see how it is done, and then can move on from there. Thanks again. Your assistance is greatly appreciated.

    Mark

  22. #22
    Registered User
    Join Date
    05-13-2008
    Posts
    19

    Found a Problem

    I sent the sheet out for use and there is a problem, I attaching the sheet so you can see what I am talking about. The sheet works great, but for some reason, anyone with the rank of e5 and below gives a ref error. you can see sheet, can you help me with this. You can also see the remarks on the far right of the person who sent it. Thanks

  23. #23
    Registered User
    Join Date
    05-13-2008
    Posts
    19

    Need Help Please

    I sent the sheet out for use and there is a problem, I attaching the sheet so you can see what I am talking about. The sheet works great, but for some reason, anyone with the rank of e5 and below gives a ref error. you can see sheet, can you help me with this. You can also see the remarks on the far right of the person who sent it. Thanks

  24. #24
    Registered User
    Join Date
    05-13-2008
    Posts
    19

    Ref Error in Sheet not matching Pay Chart Sheet for certain variables

    Anyone

    I sent the sheet out for use and there is a problem, I attaching the sheet so you can see what I am talking about. The sheet works great, but for some reason, anyone with the rank of e5 and below gives a ref error. When you select the rank and years in service it should automatically populate the pay based off the pay chart sheet. Everything above the rank of e5 and above works fine, just e5 and below. Can anyone help. Thanks
    Last edited by sabreclaw; 05-29-2008 at 10:24 AM.

  25. #25
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    Your defined name for Scale is incorrect. You have the rows/columns width, length backwards. The correct formula should be
    Please Login or Register  to view this content.
    Does that work?

    ChemistB

  26. #26
    Registered User
    Join Date
    05-13-2008
    Posts
    19

    No Luck

    I used the formula you sent, and it did not match the data on the pay sheet... Like the formula above...if I put in their rank, then the years of service, it automatically references the pay chart and gives me what their pay would be. When I input the formula you sent it changed the pay but that amount didn't match the rank or years in service
    Last edited by sabreclaw; 05-29-2008 at 10:05 AM.

  27. #27
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    sabreclaw

    Please read the Forum Rules & amend your Thread Title

  28. #28
    Registered User
    Join Date
    05-13-2008
    Posts
    19

    Done

    Sorry about that, I was in a hurry and didn't think about what I was writing, changed thread name. Sorry again, and thanks for pointing it out.

    Sabre

  29. #29
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Looks like the Row/Column arguments in the SCALE defined range were reversed...

    Formula for SCALE should be:

    Please Login or Register  to view this content.
    See Attached.

  30. #30
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    Are you putting that formula in the right place (Defined names)? Here's my amended spreadsheet.

    ChemistB
    Attached Files Attached Files

  31. #31
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    sabreclaw,

    Please don't ask the same question in 2 different threads... best to continue on the original thread or post a link to the original thread....

    I have merged the threads this time.

    Please see my response above.

  32. #32
    Registered User
    Join Date
    05-13-2008
    Posts
    19

    Sorry

    Sorry about postig the reply in two places, will not happen again. The sheet you attached on previous page will not open.

  33. #33
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Some people have been having trouble opening straight .xls attachments... try the attached .zip file.

  34. #34
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    It's a zipped copy. Here is an unzipped copy.

    ChemistB
    Attached Files Attached Files

  35. #35
    Registered User
    Join Date
    05-13-2008
    Posts
    19

    Thanks a Ton

    Worked awesome you and NBVC rock, thanks again. Both sheets are working great.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1