+ Reply to Thread
Results 1 to 9 of 9

Using the value in a pulldown list to populate other fields?

  1. #1
    Registered User
    Join Date
    10-14-2008
    Location
    New York
    Posts
    15

    Using the value in a pulldown list to populate other fields?

    First post and I thank this form for existed and its assitance

    I am relativly experienced with Excel and VBA but I am trying to think of a simple solution to this problem. I dont plan on using any macros at this point altho it is a possibility.

    Im not really sure how to word what I am asking but I am trying to use a pull down list to determine the type of form that excel will display. for example cell A1 you will choose Type 1, Type 2, Type 3 etc. and then the rest of the sheet will adjust according to which value you chose. Is there a way to do this with out having the entire spreadsheet full of many IF("type1", value1) statements?

    thank you in advance. Ill be checking back to clarify if anybody is willing to help.

  2. #2
    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
    Take a look at vlookup

    http://www.contextures.com/xlFunctions02.html

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

  3. #3
    Registered User
    Join Date
    10-14-2008
    Location
    New York
    Posts
    15
    thank you very much ill look in to it. Is there any way to have a cell with a formula such a VLookup not display "#N/A" when the information is incomplete?

  4. #4
    Registered User
    Join Date
    10-13-2008
    Location
    Australia
    Posts
    5
    There may be a better way but i've always used...

    =if(ISERROR(Vlookup formula)=True,"",(Vlookup formula))

  5. #5
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191
    If you're using Excel 2007, you can use =IFERROR(Vlookup formula,""). If it is an error, it will return a blank, otherwise it returns the Vlookup.
    Homerj, the =True is unnecessary, since Iserror evaluates to True or False already.

  6. #6
    Registered User
    Join Date
    10-14-2008
    Location
    New York
    Posts
    15
    Thanks again for your help everyone. I wasnt sure if i should create a new topic for this issue but here we go

    After experimenting with Vlookup I ran in to this problem, probably because I am using it incorrectly. I would like to be able to look up two values at once. Do I need to nest Vlookups? is this possible or is there a better function?

    for example my table (3 collums if you cant tell the A and the 1 are in differnt collums):

    A 1 Value
    A 2 Value
    B 1 Value
    B 2 Value

    How would one look up the value associated with A 1? Again things are difficult to explain but i think this made sense.

  7. #7
    Registered User
    Join Date
    10-14-2008
    Location
    New York
    Posts
    15
    I am sort of answering my own question but unfortunatly yet again it brings up another one. I discovered the function DGet. It works for one value but I dont know how to adjust it or if its even possible for it even work the way I want it to.

    Again:

    Col1 Col2 Col3
    A 1 Value
    A 2 Value
    B 1 Value
    B 2 Value

    Then else where I want to be able to complete the table.. but using a formula

    Col1 Col2 Col3
    A 1 Dgetformula which works
    A 2 If I use the same formula here I cant use the collum headers it gets confused. How can I use headers which are not directly next to the data for the "criteria" in Dget?

    thanks again.

  8. #8
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191
    Are there only unique combinations that will exist in columns A and B? If so, you can use Sumproduct, something like =Sumproduct(--(A1:A4="A")*--(B1:B4=2),C1:C4). If not, you could insert a column between B and C and have it be =A1&B1, then just change the Vlookup to be =(value1&value2,C1:D4,2,False).

  9. #9
    Registered User
    Join Date
    10-14-2008
    Location
    New York
    Posts
    15
    Thanks agian for all your help. I will continue to build this topic as I continue to tackle this problem. This mostly has to do with user interface and I am hoping this is possible again with out VBA if possible.

    Sticking with the table I was working with before Collumn A and B are entered by the user and collumn C is generated based on those values. As I mentioned in the first post I want the values in A and B to be validated and to be available from a pulldown list. I am able to do this but Cell C will not have any data unless I copy/paste the formula from the cell above.

    If, however, I use Data -> Form to enter the new information Cell C will automatically grab the formula from the cell above.

    I am looking for a way for those who are not experienced with excel/computers to be able to enter the data via a pulldown and have Cell C compute once the information has been selected.

    Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. pulldown lists - how to populate data
    By lkb3 in forum Excel General
    Replies: 2
    Last Post: 06-17-2008, 02:00 PM
  2. How Do I Have Defined List in AutoFilter Pulldown and conduct a Contains Function
    By JohnnyQuest in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-16-2008, 10:17 AM
  3. Automatically Populating Fields From a List
    By sosm1263 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-09-2008, 03:41 PM
  4. populate list box
    By talytech in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-04-2007, 12:18 PM
  5. Populate fields based on value in a drop-down list
    By sengelbrecht in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-10-2007, 09:29 AM

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