+ Reply to Thread
Results 1 to 14 of 14

VLOOKUP Problem

  1. #1
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    VLOOKUP Problem

    Using this code to fill in data from a address book
    =IF(ISNA(VLOOKUP($C$13,'Address Book'!A1:C189,2,FALSE)),"",VLOOKUP($C$13,'Address Book'!A1:C189,2,FALSE))

    Is there a way around that I can input the data without it being in address book? So if its in address book it will auto fill,but if not in address book I can still input the data?

    Thanks
    Last edited by zplugger; 09-07-2017 at 02:03 PM.

  2. #2
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: VLOOKUP Problem

    The obvious answer is to overwrite the formula - but this would not update later if address book updated.
    How about some VBA to allow you to update the address book whenever the lookup finds nothing?

    I am puzzled by your formula...
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    $C$13 does not change as you copy down. Is your lookup value always in the same cell C13?
    A1:C189 changes to A2:C190 etc as you copy down - I would not expect the lookup table itself to change
    Last edited by kev_; 09-04-2017 at 03:02 AM.
    Click *Add Reputation to thank those who helped you. Ask if anything is not clear

  3. #3
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: VLOOKUP Problem

    Thanks, maybe this will explain better.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: VLOOKUP Problem

    I have amended 2 things - see attached file for working example

    1. Data validation on C13 Error Alert set to "Warning" (was "Stop")
    - allows user to enter any value into cell C13
    2. IF statement wrapped around your Change event code
    - makes it apply only to cell C13
    - which prevents VBA overwriting manual entries in C14 & C15 with blanks
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: VLOOKUP Problem

    Thank You kev_ work like a charm

  6. #6
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: VLOOKUP Problem

    You are welcome
    Thanks for the reps

  7. #7
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: VLOOKUP Problem

    Ran into a problem,I have merge cells in C14,C15. Is there a way around this? Works perfect if there is no merge cells,but sad to say I have some.
    Attached Files Attached Files

  8. #8
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: VLOOKUP Problem

    Merged Cells and VBA do not mix very well. I will look at your file later today

  9. #9
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: VLOOKUP Problem

    C14 and C15 Merged
    see attached workbook

    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: VLOOKUP Problem

    Hello kev_
    Could not make the code work?, I must be doing something wrong.
    I think I miss led you kev_
    Cells C13,D13,E13,F13 are merge in my workbook
    Cells C14,D14,E14,F14 are merge in my workbook
    Cells C15,D15,E15,F15 are merge in my workbook

    Not sure there is a way around this,works OK if address is in address book,its the manual input killing me.
    Attached Files Attached Files
    Last edited by zplugger; 09-06-2017 at 07:05 PM.

  11. #11
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: VLOOKUP Problem

    Hello zplugger,

    Hope you are well!

    Please try this Code:

    Please Login or Register  to view this content.
    Regards.
    Attached Files Attached Files
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  12. #12
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: VLOOKUP Problem

    Thanks Windon, seems to work just find. Not sure why G24 has Data Validation, was not in my example book?

  13. #13
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: VLOOKUP Problem

    Hello again Windon
    Is there a way we can not have the warning box and select from dropbox msg. Click the cell and drop down shows normal,and if you don't select from drop down you can manually time in name and address. Just trying to make it simple?

  14. #14
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: VLOOKUP Problem

    Hi zplugger,

    I don't have a Wind on yet. In the meantime, you may call me Winon,LOL

    Replace my Code in the sample Workbook with the Code below;

    Please Login or Register  to view this content.
    Kind Regards.

+ 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. Vlookup problem in a loop with cell property and variable cell problem (long title sry)
    By ExcelsiorLux in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-13-2013, 10:38 AM
  2. Replies: 6
    Last Post: 05-28-2013, 05:08 PM
  3. vlookup? match? index? MULTIPLE criteria for vlookup search problem....
    By aborg88 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-11-2013, 09:56 AM
  4. vlookup #REF problem
    By azjd2009 in forum Excel General
    Replies: 2
    Last Post: 08-26-2009, 04:39 PM
  5. vlookup problem and count problem
    By thy00123 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-05-2009, 04:31 AM
  6. Vlookup Problem
    By randyvann in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-14-2008, 09:17 AM
  7. VLOOKUP problem
    By styoda in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-06-2008, 12:09 PM
  8. VLOOKUP problem with N/A#
    By nander in forum Excel General
    Replies: 5
    Last Post: 05-08-2007, 02:42 AM

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