+ Reply to Thread
Results 1 to 4 of 4

Aquire cell value from another sheet non adjacent cells

  1. #1
    Forum Contributor
    Join Date
    03-08-2007
    Location
    St. Augustine, Fl
    MS-Off Ver
    Excel 2021 for Mac
    Posts
    392

    Aquire cell value from another sheet non adjacent cells

    I am trying to get Wins and Losses from team sheet to match teams list on list sheet. i've searched Google trying to find something but with no luck. I've been trying for several weeks now but can't figure it out. see attached file.
    Attached Files Attached Files

  2. #2
    Spammer
    Join Date
    10-23-2012
    Location
    Adelaide, Australia
    MS-Off Ver
    Excel 2003, Office 365
    Posts
    1,237

    Re: Aquire cell value from another sheet non adjacent cells

    Try something like this in cell B3 (drag across and down)

    =IFERROR(VLOOKUP($A3,INDIRECT("'Teams'!D$" & COLUMN()*18-31 & ":H" & COLUMN()*18-16),5,0),VLOOKUP($A3,INDIRECT("'Teams'!C$" & COLUMN()*18-31 & ":G" & COLUMN()*18-16),5,0))

    PS: You might need to do some refinement regarding things like Arizona Cardinals (Mexico City) (?) and weeks where not everyone plays (and unwanted blank lines) as this formula works only with a nice consistent week by week layout of matches, but this should at least put you on the right track.
    Last edited by Croweater; 10-24-2022 at 09:41 PM.

  3. #3
    Forum Contributor
    Join Date
    03-08-2007
    Location
    St. Augustine, Fl
    MS-Off Ver
    Excel 2021 for Mac
    Posts
    392

    Re: Aquire cell value from another sheet non adjacent cells

    Could you help me understand the formula.

    =IFERROR(VLOOKUP($A3,INDIRECT("'Teams'!D$" & COLUMN()*18-31 & ":H" & COLUMN()*18-16),5,0),VLOOKUP($A3,INDIRECT("'Teams'!C$" & COLUMN()*18-31 & ":G" & COLUMN()*18-16),5,0))

    I got the IFERROR and VLOOKUP the rest is confusing to me. It works great!

  4. #4
    Spammer
    Join Date
    10-23-2012
    Location
    Adelaide, Australia
    MS-Off Ver
    Excel 2003, Office 365
    Posts
    1,237

    Re: Aquire cell value from another sheet non adjacent cells

    In your List tab, the weeks go across the columns, starting with column B (or column number 2)
    In your Teams tab (from where we need to get the result) the ranges of interest for each week are multiples of 18 rows.
    So for Week 1 the range (rows) we are interested in is rows 5 to 20, week 2 is 23 to 38, week 3 is 41 to 56 etc. (note it repeats every 18 rows)

    So we need to formula to convert column number 2 (this is where the COLUMN() function comes in...=COLUMN() gives you the column number of the cell) to the rows 5 and 20 in the Teams tab. etc.

    As it repeats every 18 rows we need to multiply the column by 18.
    For the first bit of the range we need to then take away 31 and for the second bit we need to take away 16 from the result of multiplying the column by 18. This give us our row numbers for each week in the teams tab. The columns are the same for each week.

    So I am creating a variable range for each cell in the list tab to use in the VLOOKUP in the Teams tab.

    The INDIRECT function converts the resultant string into a useable range for the VLOOKUP.

    Hope this makes sense.

+ 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] Based on adjacent cell value, Extract specific Cells to other sheet
    By Avad in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-18-2022, 12:51 PM
  2. [SOLVED] mark color for not matched items for adjacent cells based on another adjacent cells
    By tubrak in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-14-2022, 08:02 AM
  3. Copy References to Adjacent Cells in One Sheet to Alternate Cells in Another
    By ClinOps Guy in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-10-2021, 03:09 PM
  4. Cell yield value of its adjacent cell's adjacent cell on a different sheet
    By danechrest in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-27-2019, 02:08 PM
  5. Replies: 3
    Last Post: 07-16-2014, 03:24 PM
  6. Replies: 2
    Last Post: 09-20-2013, 04:10 AM
  7. What variable would I use to aquire Today()
    By CRayF in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-22-2005, 10:05 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