Complex Calculations

I am trying to create a spreadsheet to keep track of my wife's stock transactions. I want it to track the info we need to furnish the IRS on tax returns. Is there a way to create a formula or script that will run in a cell to:

Read the dates in two cells.
   Determine the number of days between the two dates.
Evaluate the number of days as greater or less than one year. Subtract numerical data from two cells. Place the result in a specific cell, based on the time being more or less than one year.

I have found nothing so far that addresses this type operation.
All help and suggestions will be greatly appreciated.
If this is not an appropriate post, please excuse me.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]