+ Reply to Thread
Results 1 to 8 of 8

Vlookup or If statement Help

  1. #1
    Registered User
    Join Date
    06-27-2005
    Posts
    15

    Vlookup or If statement Help

    Hi all,

    I'm hoping you can help ease the work of my CTRL+COPY, CTRL+PASTE fingers.

    I have one worksheet that which I have to fill-in with data from the web. I have copied and cleaned the data into 2 columns in a separate worksheet. I would like to search worksheet #2, col B for data that matches workbook#1, col b, and insert the correlating data from worksheet#2 col A into workbook#1 col e.

    Right now I'm coping and pasting these words into a search function on the webpage and then coping the data from the webpage into the workbook and my fingers are hurtin!

    Thanks for your help in advance,
    Jeff

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,912
    Not knowing all the specifics, it's a little difficult to be sure it will work, but VLOOKUP should be able to do this for you.

    1) Sheet#2 column C = column A
    2) In sheet#1 column E =VLOOKUP(B1,sheet2!b1:c100,2,false)

    Adapt references as necessary. Note that VLOOKUP can only return one value. If the values in column B occur more than once in the lookup table, you will always return the first incidence. Also I've set the final argument to FALSE because I don't know if you can sort the lookup table or if you otherwise will want to lookup using other than an exact match.

    Does that make sense or help at all?

  3. #3
    Registered User
    Join Date
    06-27-2005
    Posts
    15
    Mr.Shorty,

    It makes sense, however when I make the changes, I get a #REF!. Sheet 1, Col A contains a constant text and Sheet1 Col B contains the Code. I am using Vlookup to search Sheet2 ColA for the constant from Sheet1 Col A and extracting the correlating data from Sheet2 ColB into Sheet1 ColB.

    Here is the formula I'm currently using:
    =VLOOKUP(A1,Sheet2!A1:A100,2,FALSE)

    As a side note, when I change the col Index from 2 to 1 I get the value of Sheet2 Col A in Sheet1 Col B.

    Hope you can help me out with this,
    Jeff

  4. #4
    Forum Contributor
    Join Date
    05-03-2004
    Location
    England
    MS-Off Ver
    2003 Excel
    Posts
    118
    Hi,
    I think you need to change your range to A1:B100

    HTH.
    Greg.

    "The most overlooked advantage of owning a computer is that if they foul up there's no law against whacking them around a bit."

  5. #5
    Registered User
    Join Date
    06-27-2005
    Posts
    15
    Greg,
    I made your suggested changes and now I get an #N/A error!

    Any thoughts?

    Jeff

  6. #6
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,912
    From Excel (2002) help
    If lookup_value is smaller than the smallest value in the first column of table_array, VLOOKUP returns the #N/A error value.
    If VLOOKUP can't find lookup_value, and range_lookup is FALSE, VLOOKUP returns the #N/A value.
    Do either of these conditions apply?

  7. #7
    Registered User
    Join Date
    06-27-2005
    Posts
    15
    When I select "Help on this error' and then 'step in', i get the message that 'cell currently being evaluated contains a constant'.

    What I'm trying to do is automate a web report after I get the information from a web query. I want to automatically scan the web query for a specific web link in one col and place the correlating hits from the cell beside it into the report.

    the formula i have been trying is the one above, but to no avail.

    Please help!!

    Jeff

  8. #8
    Registered User
    Join Date
    06-28-2005
    Posts
    1

    Lookup

    3 1/2 minute demo on LOOKUP and avoiding some common problems in returning state from zip code
    http://www.kbdpower.com/Newsletter/public/lookup.html


    Quote Originally Posted by JPriest
    Hi all,

    I'm hoping you can help ease the work of my CTRL+COPY, CTRL+PASTE fingers.

    I have one worksheet that which I have to fill-in with data from the web. I have copied and cleaned the data into 2 columns in a separate worksheet. I would like to search worksheet #2, col B for data that matches workbook#1, col b, and insert the correlating data from worksheet#2 col A into workbook#1 col e.

    Right now I'm coping and pasting these words into a search function on the webpage and then coping the data from the webpage into the workbook and my fingers are hurtin!

    Thanks for your help in advance,
    Jeff

+ 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