+ Reply to Thread
Results 1 to 11 of 11

Excel 2007 : Excel Building a Formula (Vlookup?)

Hybrid View

  1. #1
    Registered User
    Join Date
    12-09-2010
    Location
    CA Bay Area
    MS-Off Ver
    Excel 2007
    Posts
    5

    Excel Building a Formula (Vlookup?)

    I have to create a formula for my spreadsheet. I have four columns A - D

    Column A & B (forms)
    A has a name
    B has an edition number

    Column C&D (forms)
    C has a name
    D has an edition number

    A&B represent a web location
    C&D represent a different storage location

    I have to cross reference A&B with C&D to see where my duplicates are.

    I did a query in Access but, my boss wants it done only with Vlookup. I have tried to use the following formula =VLOOKUP(A2,$C$7:$D$219,1,FALSE) and it doesn't exactly work. So I what formula should I be using? How can I find my duplicates (has to be done with a Vlookup Formula) and should I be using a combination? Vlookup and IF?

    Also, one problem I have had even with the above is that these columns were copy and pasted from two different spreadsheets. I have to retype the same information in the cell in order to get an accurate response. Even though nothing is different? Font, spacing, location, etc. It's all the same.

    Thoughts??? PLEASE PLEASE HELP!!!

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Excel Building a Formula (Vlookup?)

    Hi and welcome to the board

    Maybe posting a sample sheet would help ?

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

    Re: Excel Building a Formula (Vlookup?)

    Why Vlookup, there are better ways.. then you need to first COMBINE A&B and C&D in 2 new columns

    eg in E1 and F1:

    =A1&"_"&B1 and C1&"_"&D1

    both copied down.

    the "_" just puts an underscore between to ensure exact matching done.

    a better formula would be Isnumber/MATCH

    e.g. =ISNUMBER(MATCH(E1,F:F,0)) copied down would return TRUE if a duplicate found in column F
    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.

  4. #4
    Registered User
    Join Date
    12-09-2010
    Location
    CA Bay Area
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Excel Building a Formula (Vlookup?)

    I tried to combine using the Concatenate function but, that made Vlookup in possible. I agree there are other ways to do it. I am trying to learn as much as possible and apprecaite any options My boss has a huge appreciate for Vlookup. I did attach a copy of a similar worksheet.
    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: Excel Building a Formula (Vlookup?)

    See attached.

    We all have our "favourite" functions and try to make them work for as many problems as we can.. but we also realise that not all problems should be solved with that favourite function if there are better, cleaner ways....

    For example, Vlookup would not work here if you want to lookup the F values in column E... because Vlookup doesn't look backwards....

    Also, Vlookup is used to bring back items from different columns where there is a match... it is not typically used solely to find if a match exists...
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    12-09-2010
    Location
    CA Bay Area
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Excel Building a Formula (Vlookup?)

    NVBC - I agree that was not the way to go But what are you going to do when it's requested! In the sample you attached I see that the cell G6 is showing up True and it is should show False? I typed again in the cells it is drawing from as in the past re-typing the text has produced the proper result. Any thoughts on why it's not showing an exact match?

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

    Re: Excel Building a Formula (Vlookup?)

    G6 is matching E6 to all items in column F, and it looks like a match exists at F7.

    Are those not matches?

  8. #8
    Registered User
    Join Date
    12-09-2010
    Location
    CA Bay Area
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Excel Building a Formula (Vlookup?)

    Oops I think I was looking at G4

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

    Re: Excel Building a Formula (Vlookup?)

    G4 says FALSE already.. is that wrong? If so, why?

  10. #10
    Registered User
    Join Date
    12-09-2010
    Location
    CA Bay Area
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Excel Building a Formula (Vlookup?)

    Sorry it was G6 - G6 shows True
    It's in reference to F6 - The table it's drawing from is E. In E5 there is an exact match. So shouldn't G6 be populating as False? I really appreciate all your help

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

    Re: Excel Building a Formula (Vlookup?)

    As I previously mentioned, this test is not for same line matching.... this test is to see if each of the items in column E matches anything in column F.

    G6 is TRUE because the item in E6 matches one of the items in column F, namely the one in F7.

    If you want to check each F item against all the column E items, then the formula in H2 would be: =ISNUMBER(MATCH(F2,E:E,0)) copied down.

    If you are just wanting to check the elements on a row by row basis, I.e. compare E6 only to F6, etc.. then in G2, =G2=F2 copied down.

    Hope that helps.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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