+ Reply to Thread
Results 1 to 4 of 4

Index Match First Adjacent Worksheet to the Right

  1. #1
    Registered User
    Join Date
    10-17-2019
    Location
    Kentucky
    MS-Off Ver
    2019 Excel
    Posts
    33

    Index Match First Adjacent Worksheet to the Right

    Hello! I'm hoping anyone can help me on my problem.

    Every two weeks I add a worksheet to a workbook (sample attached). I need to transfer any notes from the Notes column from the first right most adjacent only worksheet (this worksheet name will always vary) to the current worksheet (this worksheet name will always be 'Open') where the P# matches.

    I need either a formula for each row where I don't have to change the name of the first right-most adjacent worksheet or VBA. If possible, the formula or VBA would need to function where the workbook would be a Google sheet. This is not a requirement but would be ideal.

    Notice:
    1-None of the worksheets can be a table
    2-The right-most adjacent worksheet could be named anything
    3-The number of rows in adjacent worksheet could vary
    4-The number of rows in 'Open' worksheet could vary
    5-Row one in every worksheet will always have the same header
    6-There will always be the same number of columns in the same order in every worksheet
    7-Not all P#s will be in every worksheet (would like the note to show blank instead of 'N/A#' for these)
    8-Not all P#s will have a note (would like the note to show blank instead of '0' for these)

    Please let me know if more information is needed. I appreciate any assistance.
    Attached Files Attached Files

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

    Re: Index Match First Adjacent Worksheet to the Right

    Maybe, put the target worksheet name in a cell and then use:

    =IFERROR(VLOOKUP(A2,INDIRECT("'"&$E$1&"'!A1:C100"),3,FALSE)&"","")

    copied down
    Attached Files Attached Files
    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.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Index Match First Adjacent Worksheet to the Right

    You could use a User Defined Function (UDF) that looks up your notes on the 2nd sheet. This code would not work on Google sheets, but it could be adapted to work (it's beyond me though).

    Put this code in a standard code module e.g. Module1

    Please Login or Register  to view this content.
    Put a formula like this in C2 and copy down
    =Sheet2Notes(A2)
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  4. #4
    Registered User
    Join Date
    10-17-2019
    Location
    Kentucky
    MS-Off Ver
    2019 Excel
    Posts
    33

    Re: Index Match First Adjacent Worksheet to the Right

    Thank you both. Both options worked. Unfortunately, I have since found out I must get it working in Google Sheets.

+ 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] Index - Match on non adjacent columns
    By mcarver49 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 06-09-2020, 12:15 AM
  2. Help, confused with index match return cell adjacent to a value
    By Iceman86 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-14-2018, 09:30 AM
  3. Replies: 6
    Last Post: 11-08-2013, 10:29 PM
  4. Index and Match Only If Adjacent Cell Value is True
    By Duggerz in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-19-2013, 07:29 PM
  5. Index/Match and return adjacent cell or workaround
    By alltimetop100 in forum Excel General
    Replies: 2
    Last Post: 03-02-2011, 08:24 AM
  6. match value in one column to adjacent value: use vlookup or index/match?
    By conorsgaffney in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-28-2010, 04:59 PM
  7. Replies: 2
    Last Post: 03-16-2009, 01:09 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