
A negative prior-year figure can make a cost increase in Excel look like an improvement, unless ABS changes the denominator. My Online Training Hub’s guide shows how that function and four others handle financial calculations, in-cell visuals and worksheet information. ABS, SIGN, REPT, TRUNC and CELL are available in all versions of Excel. They help resolve recurring calculation and display issues across financial models and reports.
Use ABS to Check Cost Changes and Invoices
TL;DR Key Takeaways :
- ABS can correct the direction of a percentage change when the prior-year amount is negative.
- SIGN prevents qualifying sales from being counted twice when criteria overlap.
- REPT turns sales values into changing bars inside worksheet cells.
- TRUNC and INT differ for negative values, while MOD can return a budget remainder.
- CELL, MID and FIND can put a saved workbook’s current worksheet name in a heading.
ABS returns the absolute value of a number, removing its positive or negative sign. It helps when the size of a difference matters but its direction does not. It can also prevent a negative denominator from reversing the sign of a year-on-year percentage change.
That calculation subtracts the prior-year figure from the current-year figure and divides the difference by the prior-year figure. Travel costs rising from -1200 to -1450 produce a change of -250, a 21% increase in costs. Dividing by the negative prior-year amount produces a positive percentage that misleadingly suggests an improvement. Wrap the prior-year figure in ABS to make the denominator positive and show the adverse change.
The same calculation shows a positive 10% change when office costs fall from 600 to 540. ABS also helps check supplier invoices against a purchase-order amount when a variance of up to 10% is allowed in either direction. Subtract the purchase-order amount from the invoice amount, apply ABS to the difference, and check whether the result is less than or equal to the purchase-order amount multiplied by 0.1. One invoice is within tolerance and the other two require checking.
Use SIGN to Avoid Counting Sales Twice
SIGN returns 1, -1 or 0 for a positive number, a negative number or zero, respectively. It can prevent overlapping logical tests from counting a qualifying row twice when you combine them with SUMPRODUCT. The latter multiplies arrays and adds the results.
For total book sales, the criteria are more than 100 units sold or a price above $20. Mathematical operations turn TRUE and FALSE results into 1 and 0, which act as switches to include or exclude rows. Adding the tests directly gives the sci-fi category a 2 because it meets both conditions, doubling its sales in the total. Wrap the added tests in SIGN before using them in SUMPRODUCT: both 1 and 2 become 1, so each qualifying book is included once.
Build In-Cell Sales Bars With REPT
REPT repeats a specified piece of text a specified number of times. Beside regional sales figures, it can create an in-cell bar that changes with the underlying value. It is one of the Excel formulas and Excel functions that can give a worksheet a visual cue without a separate chart.
To find a block character, open Insert and choose Symbol. Select Arial under fonts and Geometric Shapes under subset, then choose the block character. Enter REPT with the character in double quotes as its text argument and the sales figure as the number of repetitions. Shaded blocks or stars can provide different visual effects.
Use TRUNC to Separate Whole Amounts and Remainders
Where REPT uses a number to control a visual, TRUNC removes decimal places without rounding up or down, moving toward zero. For a price of 19.95, it returns 19; subtracting that whole-dollar amount leaves 95 cents. INT gives the same whole-number result for positive values, but rounds down rather than toward zero.
That difference matters for a negative refund or credit. With -$150.50, TRUNC returns -150 and leaves -$0.50, so the parts add back to the original amount. INT returns -151 instead, making its whole-number portion more negative.
TRUNC can also find the whole items a budget can buy when fractions are not an option. In the license calculation, the first budget divided by unit cost gives 6.33; truncating the results gives 6, 8 and 8 whole licenses across the items. To find the unspent budget, subtract the truncated budget divided by unit cost, multiplied by the unit cost, from the budget. That leaves $26.
Alternatively, use MOD with the budget as the number and the unit cost as the divisor. It returns the remainder after division, giving the same amount in a shorter formula. The TRUNC-and-MOD pattern can also work out complete boxes in a shipment, full teams from a list of people or whole weeks in a project schedule, with the remainder left over.
Retrieve Cell Details and a Worksheet Name
CELL works differently from the numerical functions: it retrieves information about a cell. Its information types include address, type and contents, as well as filename and format. To get an address, enter CELL, choose the address information type, select a cell and press Enter to return its reference.
Choosing type identifies the contents: CELL returns V for a value, L for a text label or B for a blank cell. Choose contents and select a cell to retrieve its value; the demonstrated cell returns 42. Combining CELL with MID and FIND also lets a report heading display the current worksheet name.
For a monthly report tab that may be duplicated or renamed, build the worksheet-name formula in this order:
- Save the workbook first. CELL has nothing to return for the filename until the workbook has a filename.
- Start with MID and use CELL with the filename information type and a cell reference such as A1 for its text argument. CELL returns the full workbook location, including the workbook name and the current worksheet name at the end.
- For MID’s start position, use FIND to locate the closing square bracket in a second CELL filename result referencing A1, then add 1 to start immediately after the bracket.
- Set MID’s character count to 31 and press Enter. Worksheet names can be at most 31 characters, so the formula accommodates the longest allowed name.
The complete formula is =MID(CELL(“filename”, A1), FIND(“]”, CELL(“filename”, A1)) + 1, 31). The filename result supplies the text, while FIND locates where the worksheet name begins. MID then returns the name for use in the heading.
What stands out to us is the value of combining these functions with a clear check on the result. SIGN helps when book-sales criteria overlap, while TRUNC handles a credit differently from INT. We would check those cases before relying on a total or splitting an amount: a formula can return a number while still counting a sale twice or separating a negative value in an unintended way. The CELL heading is a useful example of combining functions to maintain a report.
For a monthly report, the worksheet-name formula can keep a heading aligned with its tab. Renaming the sheet to “cell function” updates both the formula result and the heading. A duplicated or renamed report can therefore display its current sheet name without a separate heading edit.
More on Excel:
- 15 Essential Excel Functions for Lookups, Arrays and Text
- Save Hours in Excel: Build Your Own Function Library in Minutes
- 10 New Excel Functions to take your formulas to the next level in 2024
- 17 Excel Features to Try in 2026, From Copilot to Dark Mode
Media Credit: MyOnlineTrainingHub
Disclosure: Some of our articles include affiliate links. If you buy something through one of these links, Geeky Gadgets may earn an affiliate commission. Learn about our Disclosure Policy.