Solved

YEARFRAC question

Posted on 2011-03-16
8
568 Views
Last Modified: 2012-05-11
With this formula...is it possible to show when a date has been moved either forward or backwards with some method? Color-coding??
=YEARFRAC(I683,K683,1)*12
0
Comment
Question by:singleton2787
  • 3
  • 3
  • 2
8 Comments
 
LVL 50

Expert Comment

by:barry houdini
ID: 35150101
Not sure what you mean by "moved forward or back" - how does that manifest itself in the formula result?

Barry
0
 

Author Comment

by:singleton2787
ID: 35150300
To determine whether the date being compared is ahead or behind the original date...it does calc correcly, but I can't tell at glance if the compared date is ahead or behind the orginal date.

A                               B                      C                         D                 E
12/01/2011              08/01/2011        03/01/2011          8                 5(this is before col B by 5 months)
0
 
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 35150634
You can do a simple comparison of the two dates:

   =IF(C1<B1,"Before","After")

Kevin
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 35150646
You can use the above formula in a conditional formatting rule to set the color of the cell.

Kevin
0
 
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 35150714
See attached example.
Q-26891394.xlsx
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 35150905
If you want you could make the results positive or negative, e.g. by using

=YEARFRAC(I683,K683,1)*12*SIGN(K683-I683)

regards, barry
0
 

Author Comment

by:singleton2787
ID: 35151352
Barry, works great...except the negative and positive are reversed. No big deal, but is the fix easy?
0
 
LVL 50

Accepted Solution

by:
barry houdini earned 500 total points
ID: 35151889
Yes just reverse the cells in the SIGN function like this

=YEARFRAC(I683,K683,1)*12*SIGN(I683-K683)

regards, barry
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question