+ Reply to Thread
Results 1 to 23 of 23

Dropdown to give value to ANY cell

  1. #1
    Forum Contributor
    Join Date
    10-16-2008
    Location
    San Diego
    Posts
    109

    Dropdown to give value to ANY cell

    Excel 2003
    Lets see if I can even explain what I want to do.

    will have a date column
    Will have a total calorie column (this will be a sum of several column containing individual foods)

    On a separate worksheet (food sheet) will be a list of foods in one column and their calories (per serving) In the next column.

    On the first sheet I want a drop down that lists all the foods on the "food sheet). selecting from this drop down will use a vlookup (or hlookup - depending) to arrive at a caloric value.

    So here is (are) the problems. (and the solutions need to be NON-VBA)

    1. How do I tie the drop down selection to a vlookup (macro maybe)

    2. How do I use that one drop down to populate any cell on sheet one?

    can this be done without coding?

    This will be an exercise for an excel class to teach vlookups, linked sheets,
    making a dropdown, using a macro, formulas, IF statements............
    The class is probably not ready for VBA which is why this needs to be a non-coded solution.

    I am open to other solutions (related topic) that can bring together all of the above learning concepts

    thanks in advance
    Last edited by VBA Noob; 10-26-2008 at 06:29 PM.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,486
    Are you teaching the class?

  3. #3
    Forum Contributor
    Join Date
    10-16-2008
    Location
    San Diego
    Posts
    109
    Quote Originally Posted by davesexcel View Post
    Are you teaching the class?
    yes - it is a beginning excel class

  4. #4

  5. #5
    Forum Contributor
    Join Date
    10-16-2008
    Location
    San Diego
    Posts
    109
    Dave, Thanks for the links. Although I have not looked at them yet I "think" maybe I was not clear on my intent.

    I know very well how to do vlookups
    I know very well how to do macros
    I know how to make a drop down.

    what I do not know (with out coding) is if I can use a single drop down to populate any cell (by that me mean can I make that drop down populate cell b6 or b7 or b8 or c6 11 or c15 - without coding).

    If your answers are in the links and I jumped the gun, I appoligize, but from your reply (links for vlookups) I do not think I explained my self well.

    thanks

  6. #6
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,486
    Maybe supply a sample workbook explaining your question.
    If you very well know how to do all those things, you would know already that you can't magically have something happen to another cell without an excel worksheet function or without using VBA code to manipulate that other cell.

  7. #7
    Forum Contributor
    Join Date
    10-16-2008
    Location
    San Diego
    Posts
    109
    Quote Originally Posted by davesexcel View Post
    Maybe supply a sample workbook explaining your question.
    If you very well know how to do all those things, you would know already that you can't magically have something happen to another cell without an excel worksheet function or without using VBA code.
    Dave,

    The links were in deed helpful, As far as vlookups tied to a drop down.
    as for the magic - did not mean to imply I was and excel "expert" - or I would not be here asking questions.

    hope we are not getting off on the wrong foot.

    will post a mock up excel as soon as I see how to post it.

    Thanks again for the replies and links

  8. #8
    Forum Contributor
    Join Date
    10-16-2008
    Location
    San Diego
    Posts
    109
    Here is the file

    Diet.xls

    I am wanting to be able to populate the "food Values" in any column for any date from the data on sheet 2.

    If this is not doable without VBA do you have any other suggestions - or am I just taking this excerize too far?

    Thanks
    Last edited by ducecoop; 10-24-2008 at 11:12 PM.

  9. #9
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    The days in col D and dates in col E don't agree. You could format col E as ddd mm/dd/yyyy and delete col D. Or change D2 to =E2 and format as "dddd", and then copy down.

    Aside from that, do you want to have drop-downs in columns M-X that select a food (single serving assumed) and sum the day's calories in col K?
    Entia non sunt multiplicanda sine necessitate

  10. #10
    Forum Contributor
    Join Date
    10-16-2008
    Location
    San Diego
    Posts
    109
    Quote Originally Posted by shg View Post
    The days in col D and dates in col E don't agree. You could format col E as ddd mm/dd/yyyy and delete col D. Or change D2 to =E2 and format as "dddd", and then copy down.

    Aside from that, do you want to have drop-downs in columns M-X that select a food (single serving assumed) and sum the day's calories in col K?
    Column K should already be working.
    I was hoping for a "Single" dropdown on the sheet that would populate ANY cell.

    However as Dave has pointed out that is not going to happen without VBA (or appears not to).

    drop downs in columns M-X would be a second alternative - I just don't see how to do it with out one in every CELL as apposed to one in every column

    Suggestions appreciated.

    Thanks shg

  11. #11
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    A dropdown returns a value to the cell in which the dropdown appears.

    I can't make another suggestion because I don't know what you're trying to do.

  12. #12
    Forum Contributor
    Join Date
    10-16-2008
    Location
    San Diego
    Posts
    109
    Quote Originally Posted by shg View Post
    A dropdown returns a value to the cell in which the dropdown appears.

    I can't make another suggestion because I don't know what you're trying to do.
    Thats what I thought.

    Thanks for trying

  13. #13
    Registered User
    Join Date
    10-25-2008
    Location
    Vancouver
    Posts
    18
    where is the attachment? I didn't find it.

  14. #14
    Forum Contributor
    Join Date
    10-16-2008
    Location
    San Diego
    Posts
    109
    Quote Originally Posted by MMULT View Post
    where is the attachment? I didn't find it.
    Diet.xls


    Post number 8

  15. #15
    Registered User
    Join Date
    10-25-2008
    Location
    Vancouver
    Posts
    18

    Smile Hope this help

    Try this file, if you need any changes, let me know.
    Attached Files Attached Files
    =If("Y"& ou & " fall into love with me", "Send" & Me & "an Email", indirect("$C$100 & match("your heart", offset('[Canada.xls]BC'!$at$20, Row(int(rand(street)*100)),column(avenue),,3000),))

  16. #16
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161
    Quote Originally Posted by ducecoop View Post
    Thats what I thought.

    Thanks for trying
    You can only get the single dropdown to populate another cell if the cell you wanted populating has the INDIRECT function coupled with VlookUp or HlookUp, or you could use nested IF's but you are limited to 7 if you are using a version of excel other than 2007.
    Not all forums are the same - seek and you shall find

  17. #17
    Forum Contributor
    Join Date
    10-16-2008
    Location
    San Diego
    Posts
    109
    Quote Originally Posted by MMULT View Post
    Try this file, if you need any changes, let me know.
    This will work

    Thanks

    Now help me understand what you did

    Especially the look-up in every cell - Is that a "fill" process or did you do it manually?

    EDIT: It IS a "fill" process - did not know you could do that with look-ups

  18. #18
    Forum Contributor
    Join Date
    10-16-2008
    Location
    San Diego
    Posts
    109
    Quote Originally Posted by ducecoop View Post
    This will work

    Thanks

    Now help me understand what you did

    Especially the look-up in every cell - Is that a "fill" process or did you do it manually?

    EDIT: It IS a "fill" process - did not know you could do that with look-ups

    EDIT2: But it is VBA coded

    Can I make those look-ups work with out coding?

    I am looking over the VBA and don't really understand what it does

  19. #19
    Forum Contributor
    Join Date
    10-16-2008
    Location
    San Diego
    Posts
    109
    Quote Originally Posted by Simon Lloyd View Post
    You can only get the single dropdown to populate another cell if the cell you wanted populating has the INDIRECT function coupled with VlookUp or HlookUp, or you could use nested IF's but you are limited to 7 if you are using a version of excel other than 2007.
    I am now good with multiple dropdowns. I did not know you could "fill" drop downs

  20. #20
    Forum Contributor
    Join Date
    10-16-2008
    Location
    San Diego
    Posts
    109
    OK - I am guessing I am NOT going to get the vlookup result to populate the drop down choice with out VBA.
    Unless I am wrong then it is off to another option.

    at this poinr I am having trouble even getting a single dropdown in one column and a vlookup in the next cloumn to generate a correct result.

    can someone please look ans see what I am doing wrong. (Top 2 rows in green)

    Thanks
    Attached Files Attached Files

  21. #21
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    See if attached helps. Helper columns for lookup are Y to Ak

    VBA Noob
    Attached Files Attached Files
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  22. #22
    Forum Contributor
    Join Date
    10-16-2008
    Location
    San Diego
    Posts
    109
    Quote Originally Posted by VBA Noob View Post
    See if attached helps. Helper columns for lookup are Y to Ak

    VBA Noob
    It helped in 2 ways.
    I helped me fix MY vlookup

    and also gave me another approach to my original idea

    Thanks much

  23. #23
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161
    ducecoop, thanks for the feedback at every post, this is a well constructed and mannered thread and will be very helpful to people searching the same problem - keep up the good work!

+ 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