View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Fred Smith[_4_] Fred Smith[_4_] is offline
external usenet poster
 
Posts: 2,389
Default Functions for "current" & "previous" month to calculate data

Your requirement isn't clear to me, but hopefully the following hints will
help you find your answer.

The current month is =month(today())
The previous month is =month(today())-1

Your formula has several problems with it.
First, your If statement doesn't say what to do when the condition is false.
Second, you never have to use And with True. True will always be true. So
you can simplify your statement to:
=IF(MONTH(TODAY()),SOURCE_2008!E6-SOURCE_2007!E6)
Third, you're not testing the month for anything. What should the month
equal?

Regards,
Fred.

"Priss" wrote in message
...
Hi -
Working with (2)spreadsheets: 2008 and 2007 for comparison. Need
assistance
with writing formula to recognize on 2008 spreadsheet to calculate
"previous"
month, current if there is no data for "current" month. Right now I have:
=IF(AND(MONTH(TODAY()),TRUE),SOURCE_2008!E6-SOURCE_2007!E6) whereas it's
looking in a specific cell, which I rather not. Is this possible? Some
columns report "current" data and others "previous".