+ Reply to Thread
Results 1 to 14 of 14

Combining two formulas

  1. #1
    Forum Contributor
    Join Date
    05-13-2006
    Location
    League City, TX
    MS-Off Ver
    2010
    Posts
    139

    Combining two formulas

    Hello,
    Is there a way to combine two vlookup formulas? I tried this:
    Please Login or Register  to view this content.
    All I got was a 0 return.
    Last edited by mrggutz; 09-22-2010 at 06:12 PM.

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

    re: Combining two formulas

    The formula is okay if you want to concatenate the result of 2 VLOOKUP values.. although you don't need to concatenate null strings (i.e. the double quotes, as they don't appear anyway).

    What are the results of the individual Vlookups?

    Are you trying to add or concatenate?
    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.

  3. #3
    Registered User
    Join Date
    09-03-2010
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    8

    re: Combining two formulas

    Not totally clear what your goal is but I've done a sample sheet that shows how to concatenate VLOOKUPS (although your formula looks OK) or a couple of approaches to adding the data from two ranges.
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    05-13-2006
    Location
    League City, TX
    MS-Off Ver
    2010
    Posts
    139

    Re: Combining two formulas

    Ok here we go I've included a sample of what I'm working on for ya to look at.
    I have three worksheets: DATA, PSV's,Sheet1
    DATA:
    B4: is a drop down list, when a certain item is selected it will change the information in cells C6:C19 & F6:F19 according to that item selected. Then we fill in the info in the cells next to them E6:E19 & G6:G19
    PSV:
    Will pretty much do the same when as above but having trouble with returning information from Data sheet.
    You will be able to see my current formulas I'm using to try and achieve what I want,
    I can get vlookup to work with one column but not two.
    thx,
    mrggutz
    Attached Files Attached Files

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

    Re: Combining two formulas

    What is an example of the actual result you want to see, though?

  6. #6
    Forum Contributor
    Join Date
    05-13-2006
    Location
    League City, TX
    MS-Off Ver
    2010
    Posts
    139

    Re: Combining two formulas

    Here is an example of what im trying to achieve
    in the data sheet i filled out cells E6:E19 & G6:G10
    in the psv sheet it populated some cells in R9:R30
    I cant get i the vlookup to work with multiple columns.
    thx,
    mrggutz
    Attached Files Attached Files

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

    Re: Combining two formulas

    I am still a bit confused about what you want...

    this formula:

    =VLOOKUP(P10,DATA!$C$6:$G$19,3,FALSE)&" "&VLOOKUP(P10,DATA!$C$6:$G$19,5,FALSE)

    added "type centres" in R10.

    You will get #N/a if no match is found.

    to avoid that

    =IF(ISNUMBER(MATCH(P10,DATA!$C$6:$C$19,0)),VLOOKUP(P10,DATA!$C$6:$G$19,3,FALSE)&" "&VLOOKUP(P10,DATA!$C$6:$G$19,5,FALSE),"")

  8. #8
    Forum Contributor
    Join Date
    05-13-2006
    Location
    League City, TX
    MS-Off Ver
    2010
    Posts
    139

    Re: Combining two formulas

    How can I have this vlookup formula see information in multiple and columns and just return the matching value.

    =VLOOKUP(P10,DATA!$C$6:$G$19,3,FALSE)
    the number 3 is the column its looking in to match
    how can i have it look at columns 3 & 5

    This just doesn't work
    =VLOOKUP(P10,DATA!$C$6:$G$19,3,5FALSE)

    I'm not trying to combine the values to one cell just want to bring back the value that its trying to match.

    Sorry if I sound confusing.
    thx,
    mrggutz

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

    Re: Combining two formulas

    If you have consistent labeling of column P of PSV's sheet to columns C and F and the Data Sheet, then use:

    Please Login or Register  to view this content.
    copied down.

    This looks at column C first and if match found gets from E, if no match looks at column F and if a match found, gets from G, else returns a blank.

  10. #10
    Forum Contributor
    Join Date
    05-13-2006
    Location
    League City, TX
    MS-Off Ver
    2010
    Posts
    139

    Re: Combining two formulas

    That works great thanks, but when I copied it down it didn't return some of the values for some reason and it has a value on the data sheet.
    here is the book to look at.
    thx,
    mrggutz
    Attached Files Attached Files

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

    Re: Combining two formulas

    Didn't notice you had a mixture of numbers and alpha entries... that only works with one or the other....

    try:

    Please Login or Register  to view this content.
    copied down.

  12. #12
    Forum Contributor
    Join Date
    05-13-2006
    Location
    League City, TX
    MS-Off Ver
    2010
    Posts
    139

    Re: Combining two formulas

    That did the trick my friend Thank You very much. Now I need to study it so I can know how to do it for next time...lol
    Thanks again.

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

    Re: Combining two formulas

    From PM:

    I tried to add another column but it's not working can you help me out on it it's returning a 0.
    here is the formula

    Please Login or Register  to view this content.
    thx,
    mrggutz
    If you are referring still to the same workbook as you had previously attached... I think your merged columns are messing you up. It is advisable to no use merged columns as they lead to confusion and messy formulas....

    Bust, as you have the sheet now, try instead

    Please Login or Register  to view this content.

  14. #14
    Forum Contributor
    Join Date
    05-13-2006
    Location
    League City, TX
    MS-Off Ver
    2010
    Posts
    139

    Re: Combining two formulas

    Thx that did it. I undid the merged cells and it all works great now thx again.

+ 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