Closed Thread
Results 1 to 9 of 9

Auto-populate cell based on values in other cells

Hybrid View

  1. #1
    Registered User
    Join Date
    08-21-2008
    Location
    Seattle
    Posts
    2

    Auto-populate cell based on values in other cells

    I am using Excel 2003.

    I need help auto populating cells depending on what previous cells are showing.

    In Column A, I have a drop down list with a series of products.

    In Column B, I have a drop down list with two options, relating to those products in Column A.

    Column C is my Quantity column, and that value would be inputted manually.

    Column D is my Price Per column, and I would like that to auto populate, based on what is showing in Column A and Column B. So for example, if Column A is showing Product ABC and Column B is showing Option 1, it would be a different price than if Product ABC was paired with Option 2 in Column B.

    Column E would be total amt, just a simple price per x qty.

    I have absolutely no idea how to set up the relationship between Columns A and B, and Column D.

    Any help would be much appreciated!

    -Cyndi

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    I would set up a table with your products in column A of a different sheet in your workbook and prices for Option 1 in B and Op 2 in C. Then I would use the INDEX and MATCh functions to find the proper values. As per your example, the formula in column D copied down would be
    =INDEX(Sheet2!$B$2:$C$11,MATCH(A2,Products,0),MATCH(B2,Sheet2!$B$1:$C$1,0))
    where "Products" is a named range referrring to sheet2!A2:A20. Take a look at the attachment and let us know if you have any questions.

    ChemistB
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    08-21-2008
    Location
    Seattle
    Posts
    2
    This worked perfectly, thank you!

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    Glad it worked.

    ChemistB

  5. #5
    Registered User
    Join Date
    10-03-2008
    Location
    Springfield
    Posts
    6
    If I want to populate from a list of products that have different sizes but the same name, it will only return the first product values if they have the same name. Is there a way to choose different products with the same name in the drop down list and return their corresponding values?

    http://www.excelforum.com/excel-gene...her-cells.html
    Last edited by VBA Noob; 10-03-2008 at 03:09 PM.

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    If your multiple products have similar sizes, e.g. small, medium, large, then you can use a similar process as above. If they are unique to each product, you'll need to concatenate within a VLOOKUP. Do you have an example spreadsheet?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  7. #7
    Registered User
    Join Date
    10-03-2008
    Location
    Springfield
    Posts
    6

    Sample excel document

    Yes, on the Test tab when I select a product from the drop down list it will only return the 1st products values?
    Attached Files Attached Files

  8. #8
    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
    Thread closed.

    Please start your own thread as per forum rules below

    VBA Noob
    _________________________________________


    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 !!!

  9. #9
    Registered User
    Join Date
    10-03-2008
    Location
    Springfield
    Posts
    6
    Yes, how do I get it over to you to look at?

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Auto populate cell from a repeated number
    By cruzesr in forum Excel General
    Replies: 1
    Last Post: 08-13-2008, 08:22 PM
  2. Creating a Gantt based on values in cells
    By vjboaz in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-10-2008, 09:50 AM
  3. Select and copy cells based on values in another cells
    By JoC in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-25-2008, 04:39 AM
  4. Replies: 2
    Last Post: 03-01-2007, 04:51 PM
  5. Linking cells w/ values only to a referenced cell
    By Paul987 in forum Excel General
    Replies: 4
    Last Post: 09-22-2006, 03:05 PM

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