+ Reply to Thread
Results 1 to 4 of 4

Hard code column number in OFFSET formula

  1. #1
    Valued Forum Contributor
    Join Date
    11-20-2003
    MS-Off Ver
    2010, 2016
    Posts
    1,173

    Hard code column number in OFFSET formula

    I am using following formula with chart.
    Please Login or Register  to view this content.
    Is there a way to hardcode the number of columns (which currently set to move 40 columns to the right of the YValues variable) as the column of the YValue name variable does not always start in the same column. For example, the data being referred to is always in column AQ (column 43).
    Last edited by maacmaac; 11-02-2010 at 06:17 PM.

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Hard code column number in OFFSET formula

    Try

    =OFFSET(YValues,0,COLUMN(YValues)+39)

  3. #3
    Valued Forum Contributor
    Join Date
    11-20-2003
    MS-Off Ver
    2010, 2016
    Posts
    1,173

    Re: Hard code column number in OFFSET formula

    Thanks for prompt response but not quite what I was looking for.

    As an example, the YValues are in column 3. The formula you provided puts the data 42 rows to the right of column 3. Tommorrow the YValues may be in column 10, which is going to be pulling data from the incorrect column. The column I need is always column 43. I tried using following but this did not work either.

    =OFFSET(YValues,0,COLUMN(43))

    Thanks again.

  4. #4
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Hard code column number in OFFSET formula

    Try =offset(yvalues,0,43-column(yvalues))

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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