+ Reply to Thread
Results 1 to 8 of 8

Automatically lookup and set an empty cell's value if adjacent cell is typed & vice versa

  1. #1
    Forum Contributor
    Join Date
    07-30-2014
    Location
    USA
    MS-Off Ver
    Version 14.4.3, Mac 2011
    Posts
    145

    Automatically lookup and set an empty cell's value if adjacent cell is typed & vice versa

    2 Sheets: "Database" and "Client Codes"
    On Sheet Database,
    Cell B4 is where one would type a Code Number.
    Cell C4 is where one would type the corresponding Client Name.
    On Sheet Client Codes,
    Column A2 and down are Code Numbers.
    Column B2 and down are corresponding Client Names.

    I am hoping to make a Worksheet_Change that looks at Sheet Database Cells B4 and C4 and uses a Index match function to lookup the corresponding Number/Name from Sheet Client Codes.

    I started with a Sub button to simply see if I could make it work. The Index Match formula is returning a 1004 error. The next step would be to make it a Worksheet_Change private sub that makes things simple for someone entering data.

    Please Login or Register  to view this content.
    Thanks for taking the time to look,
    Red

  2. #2
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Automatically lookup and set an empty cell's value if adjacent cell is typed & vice ve

    Need to rewrite.
    Last edited by walruseggman; 05-21-2015 at 04:38 PM.

  3. #3
    Forum Contributor
    Join Date
    07-30-2014
    Location
    USA
    MS-Off Ver
    Version 14.4.3, Mac 2011
    Posts
    145

    Re: Automatically lookup and set an empty cell's value if adjacent cell is typed & vice ve

    Quote Originally Posted by walruseggman View Post
    Need to rewrite.
    Thanks I'll try :/

  4. #4
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    365 Version 2505
    Posts
    2,790

    Re: Automatically lookup and set an empty cell's value if adjacent cell is typed & vice ve

    I made up some sheets and data and couldn't get it to work with your code. I did have success after making some changes. See the code below.

    Please Login or Register  to view this content.

    EDIT

    I also had success evaluating your formula this way:

    Please Login or Register  to view this content.
    Last edited by skywriter; 05-21-2015 at 08:01 PM.

  5. #5
    Forum Contributor
    Join Date
    07-30-2014
    Location
    USA
    MS-Off Ver
    Version 14.4.3, Mac 2011
    Posts
    145

    Re: Automatically lookup and set an empty cell's value if adjacent cell is typed & vice ve

    I tried both methods and am stil finding a Run-time error 1004, Method 'Match' of object 'WorksheetFunction' Failed
    gah

    I'm reading it may have something to do with the range having over 912 characters which is interesting.
    Last edited by RedSummer; 05-22-2015 at 09:56 AM.

  6. #6
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Automatically lookup and set an empty cell's value if adjacent cell is typed & vice ve

    Maybe:

    Please Login or Register  to view this content.

  7. #7
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    365 Version 2505
    Posts
    2,790

    Re: Automatically lookup and set an empty cell's value if adjacent cell is typed & vice ve

    Quote Originally Posted by RedSummer View Post
    I tried both methods and am stil finding a Run-time error 1004, Method 'Match' of object 'WorksheetFunction' Failed
    gah

    I'm reading it may have something to do with the range having over 912 characters which is interesting.
    Post a spreadsheet.

  8. #8
    Forum Contributor
    Join Date
    07-30-2014
    Location
    USA
    MS-Off Ver
    Version 14.4.3, Mac 2011
    Posts
    145

    Re: Automatically lookup and set an empty cell's value if adjacent cell is typed & vice ve

    The sheet is a little sensitive and making a dummy one would take a considerable amount of time but thank you guys for your assistance thus far!
    John I think nailed it, ditching the INDEX MATCH entirely and just going for a find. It exceeds my expectations :D
    Definitely a lot easier to comprehend than making the worksheet formulas work.
    Best,
    Red

+ 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. VBA code to change info in one cell so that other cell changes, and vice versa
    By tarab in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-21-2016, 12:57 PM
  2. Replies: 1
    Last Post: 08-12-2014, 03:07 PM
  3. How do I make one cell blank if another cell has data in it and vice-versa?
    By Nosilla in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-06-2014, 01:21 PM
  4. [SOLVED] Make value in cell A1 dependant on value in cell B1 and vice versa
    By tanktata in forum Excel General
    Replies: 9
    Last Post: 03-29-2012, 06:11 PM
  5. Page name from cell or vice versa
    By Audiguy82 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-19-2008, 06:21 PM

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