Wednesday, December 5, 2018

DATEDIF

Have you ever needed to know the time (Months, Days, Years) between to dates? DATEDIF allows you to do this with one simple formula. It even has special rules in case you'd like to, for example, find the difference in days, but ignore years.

The syntax is as follows:

=DATEDIF (start_date, end_date, unit)

Where unit can be:

Unit Result
"Y" Difference in complete years
"M" Difference in complete months
"D" Difference in days
"MD" Difference in days, ignoring months and years
"YM" Difference in months, ignoring days and years
"YD" Difference in days, ignoring years

Examples of situations where this might be useful:
  • You are in HR and have a list of employee hire dates. You need to know how many months each employee has been employed (assume hire dates are in column A)
    • =DATEDIF(A2,TODAY(),"M")
  • You are reviewing contracts and need to know how many days it took from contract submission to contract approval (Assume submission dates are in column A and Approval dates in column B)
    • =DATEDIF(A2,B2,"D")

I'll admit, I've used other Excel formulas to try and calculate this same result; this would have saved me time and headaches. Try it out!

(more info: https://exceljet.net/excel-functions/excel-datedif-function)

Tuesday, April 17, 2018

Paste Special - Multiplication

This isn't the fanciest trick, but it is one that can save you some time.

Let's say you dump some financial data from your accounting system, and expenses come out as negative numbers. But for your report, you need them to be positive numbers. Here's what you can do.

1) Type "-1" in any cell. Copy the cell.
2) Highlight the numbers you wish to change from negative to positive (or positive to negative)
3) Paste -> Paste Special
4) Click "Multiply," then OK

That's it! All values are multiplied by -1. You an also use this same process to divide, add, or subtract all numbers by a specific value.