DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Related

  • Supervised Fine-Tuning (SFT) on VLMs: From Pre-trained Checkpoints To Tuned Models
  • Enhancing Business Decision-Making Through Advanced Data Visualization Techniques
  • Exploring Intercooler.js: Simplify AJAX With HTML Attributes
  • Building an AI/ML Data Lake With Apache Iceberg

Trending

  • Understanding the Shift: Why Companies Are Migrating From MongoDB to Aerospike Database?
  • Supervised Fine-Tuning (SFT) on VLMs: From Pre-trained Checkpoints To Tuned Models
  • Immutable Secrets Management: A Zero-Trust Approach to Sensitive Data in Containers
  • Accelerating Debugging in Integration Testing: An Efficient Search-Based Workflow for Impact Localization
  1. DZone
  2. Data Engineering
  3. Data
  4. Excel Hacks To Ignore Missing Data

Excel Hacks To Ignore Missing Data

Is missing data an obstacle for you? Here are some workarounds in Excel so you can move past it.

By 
B Jones user avatar
B Jones
·
Dec. 08, 16 · Tutorial
Likes (3)
Comment
Save
Tweet
Share
7.3K Views

Join the DZone community and get the full member experience.

Join For Free

I’ve done quite a bit of work with Excel over the last few years, and I’ve found a couple of recurring problems when there’s missing or error data in ranges. I’ve had to work around this enough times that I thought it was worth sharing the solutions I’ve used.

Beautiful green bird eating orange peels

Using AGGREGATE() Instead Of MIN()

Aggregate functions such as MIN() and SUM() often produce errors when they’re defined over a range with missing or bogus data. Although this is good, I often want to create a spreadsheet that operates over a fixed range, with computations based on that range. And I want to avoid complicated IF() or error-handling in long formulas, which make them hard to maintain and understand. In some cases, I’ve found that there’s really no way to solve the problems through that approach anyway. For example, if I use IFERROR() and output a 0 when there’s an error, the next set of cells that are derived from that output will divide-by-zero and it’s just turtles all the way down.

With the AGGREGATE() function, I have found a way to solve some of these issues. In return for using a function whose meaning and syntax is a little confusing, I can centralize all the mess into one place instead of smearing it all over the entire spreadsheet.

Here’s an example. I’ve entered some numbers in a range, and then filled the rest of the range with =LOG(0) to create an error. Then I’ve tried to take the MIN()of B6:B15 in cell C6. This results in an error, of course.

min-error

You can solve this with the AGGREGATE() function. You have to look up the documentation for the syntax and meaning of each set of options, but in short, you can specify an aggregate operation, extra arguments, and what to do if there are errors. Here’s how to get the MIN() result I want:

min-error

Using OFFSET() To Create Ranges

Sometimes I haven’t been able to work around all the challenges using AGGREGATE() and I’ve needed to specify a variable-sized range. This is possible with the OFFSET() function.

For example, suppose I want to do linear regression using the LINEST()function, but part of the range might contain errors or non-values. After typing in the formula in cell D6 and using the “array formula” command (Control-Shift-Enter), I get the following:

linest-error

OFFSET() can help. It defines a range relative to a specified cell. You specify where the range begins, and how many rows and columns it covers. As long as the range contains a contiguous set of values (all the non-values are at the end), OFFSET() together with COUNT() can define a variable-sized range that adapts to the valid set of cells. COUNT() counts the number of valid values in the range, so you can use it as the argument to OFFSET() to set the size of the resulting range.

Here’s the solution in action on my example spreadsheet. I’m using OFFSET()to specify the first two parameters to LINEST(), defining the ranges C6:C10 and B6:B10.

linest-using-offset-count

The caveat with OFFSET() is that, unlike explicitly setting a range with cell identifiers, Excel won’t adjust the range when you do things like deleting rows from the middle of it.

Conclusion

Both of these workarounds introduce their own complexities: with AGGREGATE() you’re adding a more obscure syntax, and with OFFSET() you’re circumventing some of Excel’s features to help maintain and adapt your spreadsheet. In both cases, though, I’ve found that in some circumstances the net outcome is a simpler, more comprehensible spreadsheet overall.

Pic Credit (which has nothing to do with anything, but it’s pretty)
Data (computing)

Published at DZone with permission of B Jones, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Supervised Fine-Tuning (SFT) on VLMs: From Pre-trained Checkpoints To Tuned Models
  • Enhancing Business Decision-Making Through Advanced Data Visualization Techniques
  • Exploring Intercooler.js: Simplify AJAX With HTML Attributes
  • Building an AI/ML Data Lake With Apache Iceberg

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!