Question

Have I hit a limit using the OFFSET function?

Asked by: steve0412

In two of my database-based spreadsheets, I have come accross a problem that I cannot solve. Namely, that formulas using the OFFSET function cease to work. The error checker displays the #value error for a name, which is defined, for example, like

=OFFSET(trades!$G$32,0,0,boTTom,1), where boTTom is defined as =COUNTA(trades!$A$32:$A$132)-1.

 Therefore, when I enter a new record reference in column A, the other names get automatically updated so that they include the lates record.(The "-1" is to subtract the row header).

What is going on here and is it a bug or one of the things M$ don't talk about because it is an inherent weakness?

What can I do for a workaround in a large spreadsheet?

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2006-04-14 at 04:10:54ID21813858
Tags

offset

Topic

Microsoft Excel Spreadsheet Software

Participating Experts
2
Points
125
Comments
12

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Different OFFSET formula?
    Hi I've got a spreadsheet with the months listed from column E through to P. This is for the months with their respective budgets. Every month I need to know the Year to date value of a certain account. So 3 months down the line I need to sum coulumn E, F & G to give me...
  2. Count using SUM(IF as well as Offset in an array formula
    OK so I have an array formula that counts the number of times that a row sums to 3 This formula is: =SUM(IF((SUMIF(OFFSET('Trade-Data'!J6:AC6,ROW('Trade-Data'!A5:A1000)-1,0),">=0")=3),1,0)) This outputs 4 which is the correct answer. But what I am trying to d...
  3. Sum with offset
    Hi Experts, I have a question very similar to the one posted in the below link. I have a spreadsheet with week 0701 - 0752 (col B to BA), I have a total in col BB to give me the current month to date, that is sum(J3:N3) and col BC which is year to date and the formula is =su...
  4. Offset Clarification
    Experts, I'm not sure if OFFSET is what I need, and I'm just using it wrong, or I need another fuction. What I'm trying to do is set up a worksheet to read another Excel file which is an extract of data from a web based system. So, for example, the extract contains data su...
  5. vLookup V offset?
    I hope an Excel Guru might know the answer to this: Column A contains Customer Number Column B contains Payment Date Most customers pay only once per month, but some customers may make multiple payments (max 4) When I do a vLookup, I can easily get the first payment. What...
  6. Using OFFSET in my exisitng formulas
    I have some formulas that I'd like to modify to use the OFFSET formula because the number of rows in my worksheets keeps changing. How can I modify these formulas to add the OFFSET formula?

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: patrickabPosted on 2006-04-14 at 05:38:40ID: 16452842

steve0412,

I think you have the parameters in the wrong place. You've got:

=OFFSET(trades!$G$32,0,0,boTTom,1), where boTTom is defined as =COUNTA(trades!$A$32:$A$132)-1.

whereas OFFSET() is defined as:

OFFSET(reference,rows,cols,height,width)

The way you have set it up is that OFFSET() will return data =COUNTA(trades!$A$32:$A$132)-1 wide. I somehow doubt that you want that. Instead I suggest that you most probably want:

=OFFSET(Trades!$G$32,0,BoTTom,1,1) for columns defined by =COUNTA(trades!$A$32:$A$132)-1

or perhaps

=OFFSET(Trades!$G$32,BoTTom,0,1,1) for rows defined by =COUNTA(trades!$A$32:$A$132)-1

Patrick

 

by: byundtPosted on 2006-04-14 at 09:57:39ID: 16455291

The OFFSET syntax looks good to me. It is returning a range that is xx rows tall by one column wide, starting at G32.

There are a few times that I've used dynamic named ranges and they didn't work. I suspect that this happens when the function requires a range, and it isn't smart enough to know that it is getting one when using a named formula such as created with the OFFSET. So how are you trying to use these dynamic named ranges?

I prefer to use INDEX for my dynamic named ranges. Doing so avoids making formulas using the named range volatile. Volatile formulas (ones that use volatile functions like OFFSET, RAND, NOW or TODAY) must recalc every time anything changes in any open workbook. If you use these named ranges a lot, your recalc time can get sluggish.
=trades!$G$32:INDEX(trades!$G$32:$G$132,COUNTA(trades!$A$32:$A$132))

Brad

 

by: steve0412Posted on 2006-04-14 at 09:57:54ID: 16455293

Hi Patrick

I don't think my formula is wrong, because it has worked fine (until now) and in many other spreadsheets I have made. It is the range that I am trying to name with the offset. Therefore, I am purposely defining the height of the range defined in the offset. The idea is that as I enter a new reference, the new row gets included in the database that has named ranges (for various columns).

Steve

 

by: patrickabPosted on 2006-04-14 at 12:24:32ID: 16456421

Steve,

I see what you are wanting to do. Brad has also thrown some light on the whole subject so with luck his suggestions will crack the problem.

Patrick

 

by: steve0412Posted on 2006-04-14 at 14:23:54ID: 16457401

I will give Brad's suggestion a try and report back

 

by: byundtPosted on 2006-04-14 at 15:00:50ID: 16457663

Steve,
I'll be surprised if INDEX works and OFFSET doesn't. I was hoping you might post the formula that fails to work using your dynamic named range.

Brad

 

by: steve0412Posted on 2006-04-14 at 15:06:52ID: 16457701

I think I have found the error: I had hidden some rows to prevent users entering data below a certain row. In hindsight, this was not a good idea! I spotted it after seeing that there was a gap in the row numbers!! I have found to interesting facts though:

1. What is wrong with using COUNTA($A:$A) or even calling $A:$A a rang name?

2. I think your suggestion of using INDEX may be superior if it does speed up the processing (but I haven't tried this throughout (means reålacing several formulas)

 

by: byundtPosted on 2006-04-14 at 15:34:21ID: 16457819

There isn't anything wrong with applying COUNTA to an entire column. But your dynamic named range doesn't begin with row 1, so everything above the beginning would need to be blank.

Brad

 

by: steve0412Posted on 2006-04-15 at 15:51:38ID: 16462069

I want to award the points now, but I would still like to know if I should replace all the OFFSETs with the INDEX function. Why is the INDEX function not volatile? Will it save resources and therefore speed processing to use the INDEX function?

Steve

 

by: byundtPosted on 2006-04-15 at 16:02:39ID: 16462100

Steve,
Take a look at the discussion here: http://www.decisionmodels.com/calcsecretsi.htm
There is also a link to some code (FastExcel) that will test the amount of time wasted by the volatility in your workbook.

Brad

 

by: byundtPosted on 2006-04-17 at 05:11:06ID: 16468443

Steve,
Thanks for the grade!
Brad

 

by: steve0412Posted on 2006-04-17 at 05:51:06ID: 16468657

Post Script: I have found that the Index function works, but it is a dangerous thing to use INDEX in a cell with a formula: I have found that it causes circular references if I am not careful.

The Fast Excel looks interesting; the links, especially to the 'Best Practices' document, are most useful.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...