+ Reply to Thread
Results 1 to 14 of 14

VLookup function

Hybrid View

  1. #1
    Registered User
    Join Date
    04-15-2017
    Location
    Berlin
    MS-Off Ver
    365
    Posts
    5

    VLookup function

    Hey guys,

    I am having a problem with the range of cells. I have a table which contains 836 record of cities and another table of 9 rows and 2 columns. The second table has the city name and its state. I would like to match that with the 836 records so i would have each city with state. This is sales sheet where we view customer city and state. I have used this formula VLOOKUP(A3,C3:D10,2,FALSE) but when I copy and paste for the next cell the cells range lookup increases. When this happens excel exits the lookup range and comes back with zero or the wrong state.

    how can I make the lookup range fixed. Always C3:D10 and only the A column increases.

    Thanks guys

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,798

    Re: VLookup function

    Attach a sample workbook (not image). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: VLookup function

    Try:

    =VLOOKUP(A3,$C$3:$D$10,2,FALSE)

    if that's not it - post a sample sheet.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  4. #4
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: VLookup function

    maybe you should use: VLOOKUP(A3,$C$3:$D$10,2,FALSE)

  5. #5
    Registered User
    Join Date
    04-15-2017
    Location
    Berlin
    MS-Off Ver
    365
    Posts
    5

    Re: VLookup function

    I tried with the dollar sign and it did work with fixing the lookup range but the states didnt correspond to the correct cities. here is the link to the sheet.
    https://www.dropbox.com/s/r9boqfwlwa...tate.xlsx?dl=0

    thank you so much.

  6. #6
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,943

    Re: VLookup function

    (How to) Upload a Workbook directly to the Forum
    (please do not post pictures or links to worksheets)
    • Click Advanced next to Quick Post button at the bottom right of the editor box.
    • Scroll down until you see "Manage Attachments",
    • Click the "Choose" button at the upper left (upload from your computer).
    • Select your file, click "open", click "upload"
    • Once the upload is completed the file name will appear below the input boxes in this window.
    • Close the Attachment Manager window.
    • Click "Submit Reply"
    Note: Please do not attach password protected workbooks/worksheets
    Ensure to disable any Workbook Open/Autorun macros before attaching!
    Ben Van Johnson

  7. #7
    Registered User
    Join Date
    04-15-2017
    Location
    Berlin
    MS-Off Ver
    365
    Posts
    5

    Re: VLookup function

    ok uploaded
    Attached Files Attached Files

  8. #8
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: VLookup function

    maybe this one: =IFNA(INDEX($D$2:$D$9,MATCH(A2,$C$2:$C$9,0)),"")


    read: VLOOKUP()
    Last edited by sandy666; 04-15-2017 at 02:09 PM.

  9. #9
    Registered User
    Join Date
    04-15-2017
    Location
    Berlin
    MS-Off Ver
    365
    Posts
    5

    Re: VLookup function

    OMG works perfectly. THANK YOU SO MUCH

  10. #10
    Registered User
    Join Date
    04-15-2017
    Location
    Berlin
    MS-Off Ver
    365
    Posts
    5

    Re: VLookup function

    this formula works perfectly. THANK YOU SO MUCH. #lifesaver

  11. #11
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: VLookup function

    You made an error in transcribing the formula (lesson:post a sample workbook to begin with next time).

    It should be

    =VLOOKUP(A2,$C$2:$D$9,2,FALSE)

    there are some errors - largely cos you have an extra space after San Diego in C2. Remove it....

    PS I based my answer on your dropbox file. If your latest one is different, the formula may not work yet.
    Attached Files Attached Files

  12. #12
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: VLookup function


  13. #13
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: VLookup function

    you're welcome!

  14. #14
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: VLookup function

    Thanks for rep

    but you forgot mark thread as SOLVED.

    Go to your very first post
    Look at right top corner to see Thread Tools
    Select SOVED
    Last edited by sandy666; 04-15-2017 at 02:48 PM.

+ 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. [SOLVED] Trying to Multiply the result of an IF function combined with a VLOOKUP function
    By ucca in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-28-2018, 02:32 AM
  2. [SOLVED] VLOOKUP formula or VLOOKUP worksheet.function
    By Crispy85 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-09-2017, 09:40 AM
  3. Replies: 2
    Last Post: 01-15-2014, 11:40 PM
  4. Need help nesting an index/match function within a Vlookup function.
    By Christopher135 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-04-2013, 06:16 PM
  5. Worksheet function Vlookup and VLOOKUP return different results
    By zandero in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-08-2010, 08:24 AM
  6. Replies: 1
    Last Post: 12-02-2005, 09:35 AM
  7. [SOLVED] vlookup function-Can vlookup command find the data from the 5 sheets.
    By Rishab shah in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM

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