1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Excel comparing 2 columns

Discussion in 'Business Applications' started by Bsoda, Jun 23, 2011.

Thread Status:
Not open for further replies.
Advertisement
  1. Bsoda

    Bsoda Thread Starter

    Joined:
    Jun 23, 2011
    Messages:
    2
    I have a spreadsheet that I wish to compare 2 columns and bring the information from the 3rd. For example, if A6 is equal to an item in G1:G98, then the number in B6 should equal the corresponding number in H1:h98. The formula I used is =VLOOKUP(A8,$G$1:$H$98,2,FALSE) It works great except the problem I have is sometimes there is no corresponding value in G1:G98. In that case I would like it to enter the number 0.
     
  2. Yorkshire Guy

    Yorkshire Guy

    Joined:
    Dec 9, 2003
    Messages:
    563
    Hi Bsoda,

    =IF(ISERROR(VLOOKUP(A8,$G$1:$H$98,2,FALSE)),0,(VLOOKUP(A8,$G$1:$H$98,2,FALSE)))


    lol
    Hew

    (looking at what I just posted, its displaying an extra space in the final FALSE, but its not there when I go to Edit it!!)
     
  3. Bsoda

    Bsoda Thread Starter

    Joined:
    Jun 23, 2011
    Messages:
    2
    Thank you! It worked great!
     
  4. Yorkshire Guy

    Yorkshire Guy

    Joined:
    Dec 9, 2003
    Messages:
    563
    hi Bsoda,

    That's great, you are welcome.

    Please use THREAD TOOLS to mark as solved.
    lol
    Hew
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1003722

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice