+ Reply to Thread
Results 1 to 2 of 2

Google Sheets - Dynamically alter range based on column heading

  1. #1
    Registered User
    Join Date
    06-05-2017
    Location
    Trowbridge, England
    MS-Off Ver
    2010
    Posts
    4

    Google Sheets - Dynamically alter range based on column heading

    Hiya, I've got several parts of a formula that I need help sticking together

    Context is an attendance spreadsheet

    Sheet 1 is called SAM Data. This looks at data on the other sheets and comes back with dates (which are the headings on the other two sheets)
    Sheet 2 is called Year to Date. This has week numbers for headings from Column E to AQ in Row 1, and % data in the rows below.
    Sheet 3 is called Weekly. This has week numbers for headings from Column E to AQ in Row 1, and % data in the rows below. The headings are the same as Sheet 2.

    In Sheet 1, Column E looks for when Sheet 2 first fell below 94%, and returns that header/week number
    Column G needs to check for the second time that Sheet 3 falls below 94%, but after the week number returned in Column E.

    I've got this formula that finds the second instance for below 94% in a row in general:
    =IFERROR( IF( COUNTIF(A$1:AQ$1,"<0.94")>=2, INDEX( FILTER(COLUMN(A$1:AQ$1), A$1:AQ$1<0.94), 2 ), "" ), "" )

    And this one that finds the column number for when Sheet 2 first fell below 94%
    =IF(E2="", "", MATCH(E2, Weekly!$1:$1, 0))

    Can these two be combined so that the start of the range in the first formula is the column number given in the second formula?

    Happy to share the link if I'm allowed

    Thanks!

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2504
    Posts
    19,400

    Re: Google Sheets - Dynamically alter range based on column heading

    If you could attach an Excel version of the google sheets file, then someone using Excel 365 might be able to modify the "second instance" formula.
    It would seem, based on the functions used in the formulas, that an Excel based answer might transfer to google sheets.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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] Google Sheets: Add values based on top 2 numbers in separate column
    By sailnmusic in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 12
    Last Post: 09-19-2022, 11:02 AM
  2. Help with filter formula please: skip column from range (Google Sheets)
    By hbk018 in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 2
    Last Post: 01-08-2022, 10:09 AM
  3. email row contents based on cell values (google sheets populated by google forms)
    By reedg in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 0
    Last Post: 01-13-2016, 02:55 PM
  4. [SOLVED] Dynamically Alter Macro Based on Tab Name or Cell Value
    By mandora in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-09-2014, 07:50 PM
  5. Dynamically lookup value based upon column heading (date)
    By DangerMouse in forum Excel General
    Replies: 0
    Last Post: 04-24-2006, 06:42 AM
  6. [SOLVED] Select cells based on named Range and a column heading
    By achidsey in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-11-2005, 11: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