+ Reply to Thread
Results 1 to 7 of 7

Any limit on columns for OFFSET

  1. #1
    Forum Contributor
    Join Date
    08-16-2012
    Location
    Pendleton, OR
    MS-Off Ver
    Excel 2013
    Posts
    129

    Any limit on columns for OFFSET

    I have a large Worksheet and I am running into a problem after column ZZ (703). The line of code is =SUM(OFFSET(dataset!ZZ$8,(ROW()-3)*$B$1,COLUMN()-1,$B$1,1))/$B$1, which calculates correctly, but when I paste into columns AAA and beyond, it seems to flash a number and then become 0. The dataset page goes up to column BAZ and there is data in every row and column. cell $B$1 is a number of cells to sum together as the dataset is being reduced on the next page.

    That this happens on column AAA makes me scratch my head and think I may be up against a size limitation, but I cannot find any reference to it.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Any limit on columns for OFFSET

    Hi johnny,

    Here is the MSDN site that gives as much as I can find about Offset()
    https://support.office.com/en-us/art...E-B4D906D11B66

    I wonder what the max column is in older versions of Excel and if the Mac version of excel uses that number.
    https://support.office.com/en-us/art...E-C11D89120C76

    What machine are you running this on? If an older version of Excel, that might be causing the problem.

    Go to the last column to the right and type this formula "=Column()" and press enter. That number will the maximum number of columns for your version.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,431

    Re: Any limit on columns for OFFSET

    Should the reference cell of the offset formula have a absolute column position rather than relative?

    dataset!$ZZ$8
    Cheers
    Andy
    www.andypope.info

  4. #4
    Forum Contributor
    Join Date
    08-16-2012
    Location
    Pendleton, OR
    MS-Off Ver
    Excel 2013
    Posts
    129

    Re: Any limit on columns for OFFSET

    I am running Excel 2013 under Windows 7. Marvin, I didn't understand your suggestion about the furthest right column and using =Column(). That would give me the numerical value of that column, not the maximum. My columns go up to BAZ, but I can add more columns. The problem is they all become zero, but only the page that does the sum on the original data. The original data is populated with numerical values that were read from an instrument file. They all look fine.

    Andy, these are relative positions because I am condensing data vertically, but doing it in matching columns to the original dataset.
    I wish I could attach the file but it is too large. It is 182MB, but I will try creating a smaller version but would still have at least 703 columns since that is where the failure occurs.

    Thanks for the suggestions. I am still pondering this.

  5. #5
    Forum Contributor shivya's Avatar
    Join Date
    08-19-2017
    Location
    Delhi, India
    MS-Off Ver
    2013
    Posts
    240

    Re: Any limit on columns for OFFSET

    No limit of column.
    Use counta() function with offset for dynamic range.

  6. #6
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Any limit on columns for OFFSET

    Hi Johnny,

    Have you tried the "Evaluate" tool built into Excel? It is on the Formulas tab. You can step through your formula to see what fails first. As Andy said above, when you have large relative formulas they sometimes go where you didn't expect. IE: a formula using Row() - 3 might go to a negative number row and there is no such thing.
    https://support.office.com/en-us/art...6-a70aa409b8a7

    What I mean by the "=Column()" is to press Ctrl-Right a few times to get to the last column and put the formula there. I was wondering if you had an earlier version of Excel or Mac Excel that didn't support 16,000+ columns.

  7. #7
    Forum Contributor
    Join Date
    08-16-2012
    Location
    Pendleton, OR
    MS-Off Ver
    Excel 2013
    Posts
    129

    Re: Any limit on columns for OFFSET

    Thanks, Marvin for the suggestion of the Evaluate tool. That pointed out that Andy was spot on about the relative reference. I did intend it to be relative and not absolute, but I did not mean to call the column() The Evaluate worked great, showing the referenced arrays to sum.

    Sorry for having to sleep on this and not respond quickly. I discovered it at the end of the day, when I expanded the worksheet to cover more data and was baffled. I stuck around for a while but maybe the sleeping on it was a better idea. Anyway, thanks and I will mark it as solved.

+ 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] Limit columns to be filtered in a table
    By digita in forum Excel General
    Replies: 2
    Last Post: 08-09-2016, 08:43 PM
  2. Limit entirerow columns with VBA code
    By ChrisPatterson in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-29-2015, 09:56 AM
  3. [SOLVED] How to SUM columns using a variable limit
    By insomniac53 in forum Excel General
    Replies: 3
    Last Post: 05-17-2015, 02:20 PM
  4. Limit to number of columns in List Box?
    By Leah in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-20-2009, 10:41 PM
  5. Range.Offset limit in Excel 2007?
    By spl3001 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-09-2008, 08:15 PM
  6. [SOLVED] Can I add more columns to a spread sheet or is limit 256 columns
    By Piper in forum Excel General
    Replies: 4
    Last Post: 10-09-2005, 04:05 PM
  7. [SOLVED] What is the limit size for columns in Excel???
    By Melissa in forum Excel General
    Replies: 5
    Last Post: 05-16-2005, 05:06 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