**Please Note: **
This article is written for users of the following Microsoft Excel versions: 2007 and 2010. If you are using an earlier version (Excel 2003 or earlier), *this tip may not work for you*. For a version of this tip written specifically for earlier versions of Excel, click here: Dealing with Long Formulas.

Anyone who has been using Excel for any length of time knows that some formulas can get quite long. Excel handles them—as long as they are constructed correctly—but they can be a bear for humans to understand. Even after you develop your own formulas, you may have trouble understanding them weeks or months later.

One way to make formulas a bit easier to understand is to use **Alt+Enter** in the middle of the formula to "format" how it appears on the screen. Consider, for instance, the following long formula:

=+IF($A2=0,0,IF($B2<4264,0,IF(AND($B2>=4264,$B2<=4895), (-22.31*$C2/365),IF(AND($B2>=4895,$B2<=32760),($B2*0.093- 476.89)*$C2/365,IF($B2>32760,($B2*0.128-1623.49)*$C2/365)))))

This formula could also be written in the following manner, with **Alt+Enter** being pressed at the end of each line in the formula:

=+IF($A1=0,0, IF($B1<4264,0, IF(AND($B1>=4264,$B1<=4895),(-22.31*$C1/365), IF(AND($B1>=4895,$B1<=32760),($B1*0.093-476.89)*$C1/365, IF($B1>32760,($B1*0.128-1623.49)*$C1/365)))))

Now, the broken-up formula appears on five lines, even though it all appears in a single cell. The broken-up formula works just as if it were all on one line.

In addition, if you copy the complete broken-up formula from the Formula bar and paste it into a worksheet, each line in the formula is pasted into a different cell, making it easy to test each part. This is much quicker than copying and pasting parts of the original formula.

*ExcelTips* is your source for cost-effective Microsoft Excel training.
This tip (11251) applies to Microsoft Excel 2007 and 2010. You can find a version of this tip for the older menu interface of Excel here: **Dealing with Long Formulas**.

**Save Time and Supercharge Excel!** Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out *Excel 2010 VBA and Macros* today!

Excel provides worksheet functions that make it easy to count things. What if you want to count records that match more ...

Discover MoreDo you need to determine the top three values in a range of columns? The techniques discussed in this tip will come in ...

Discover MoreGiven a range of cells, you may at some time want to calculate the sum of only the largest values in that range. Here is ...

Discover More**FREE SERVICE:** Get tips like this every week in *ExcelTips,* a free productivity newsletter. Enter your address and click "Subscribe."

2015-04-01 11:20:53

2015-04-01 10:49:13

Gary Lundblad

That is great Chuck!

Thank you!

Gary

2015-03-31 12:33:07

Dave O

2015-03-31 11:45:56

Chuck Trese

These two (numeric) formulas give identical results:

=SUM(B12:B15)

=SUM(B12:B15) +N("explanation text here")

Also, these two (text) formulas give identical results:

=B3&B4&B5&B6

=B3&B4&B5&B6 &T(N("explanation text here"))

2015-03-31 11:38:26

Chuck Trese

For formulas that return text, you can use &T(N("explanation text"))

2015-03-31 11:10:30

Gary Lundblad

Thank you!

Gary

2015-03-31 10:10:11

bmultack

2015-03-31 09:05:38

Jen T

2015-03-31 08:16:45

2015-03-31 07:30:06

John H

2015-03-31 07:20:59

CStripling

2015-03-31 07:12:50

Got a version of Excel that uses the
ribbon interface (Excel 2007 or later)?
**This site is for you!** If you
use an earlier version of Excel, visit
our *ExcelTips* site focusing on the menu interface.

**FREE SERVICE:** Get tips like this every week in *ExcelTips,* a free productivity newsletter. Enter your address and click "Subscribe."

Copyright © 2019 Sharon Parq Associates, Inc.

## Comments