+ Reply to Thread
Results 1 to 8 of 8

Variable column reference (formula compression)

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    01-26-2018
    Location
    London, England
    MS-Off Ver
    365
    Posts
    312

    Variable column reference (formula compression)

    Hi guys,

    Not quite sure where to start with this one. Basically, I need the bits of the formula in I6 - to begin at different points dependant on the value of G6. Might not have been clear there!!

    Currently, the formula in I6 uses C6 (column 1) as its reference:

    0SexLSS5QYK82RefLf6Jsg.png

    However, I need to to use the value at G6 as the reference (i.e. formula begins at column 3). Therefore, certain parts of the formula get compressed:

    BiAn3a5_RHSOhHJaowrBvg.png

    Is this possible?

    Thanks
    Mdn
    Attached Files Attached Files

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Variable column reference (formula compression)

    If you update your sample workbook with the desired results (manually entered), instead of the non-working formulas, I'll take a look.

  3. #3
    Forum Contributor
    Join Date
    01-26-2018
    Location
    London, England
    MS-Off Ver
    365
    Posts
    312

    Re: Variable column reference (formula compression)

    Really appreciated Falcon

    Here's the updated workbook (perfect result is in column I)
    Attached Files Attached Files

  4. #4
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Variable column reference (formula compression)

    Are you trying to use the "Last 4" values or something like that?
    Clicking the Add Reputation star below helpful posts is a great way to show your appreciation.
    Please mark your threads as SOLVED upon conclusion (Thread Tools above Post # 1). - Lee

  5. #5
    Forum Contributor
    Join Date
    01-26-2018
    Location
    London, England
    MS-Off Ver
    365
    Posts
    312

    Re: Variable column reference (formula compression)

    Hi Lee

    Essentially, these two parts of the formula, change depending on the value of G7:

    HgC5AsV_QOOQE_nh4hU1mw.png

  6. #6
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Variable column reference (formula compression)

    Try this in I6:

    =IFERROR(IF(AND(INDEX(C6:F6,G6)<H6,SUMPRODUCT((C$5:F$5>=G6+1)*(C6:F6>=H6))),IF(F6>H6,"WINNER","LOSER"),""),"")

  7. #7
    Forum Contributor
    Join Date
    01-26-2018
    Location
    London, England
    MS-Off Ver
    365
    Posts
    312

    Re: Variable column reference (formula compression)

    Fab-u-lous Falcon!

    Massively appreciated

  8. #8
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Variable column reference (formula compression)

    You're welcome. Thanks for the rep!

+ 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. Matrix compression (formula to lookup and compress values)
    By BartoszXIV in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-01-2017, 03:29 AM
  2. Reference a column from a variable
    By Rob K in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-08-2015, 11:05 AM
  3. [SOLVED] Reference a variable cell in a SUM formula based on values in a different column
    By sshot1 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-17-2013, 12:40 PM
  4. Using SUMIFS on a variable column reference?
    By tangcla in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-23-2013, 08:15 PM
  5. Variable Column Reference from number
    By Jannis in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-13-2012, 10:06 AM
  6. Using Variable as Column Reference in SumProd
    By Engineers2008 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-08-2010, 06:17 PM
  7. Variable Find reference to a column?
    By crowdx42 in forum Excel Programming / VBA / Macros
    Replies: 26
    Last Post: 11-19-2006, 11:13 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