View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Priss Priss is offline
external usenet poster
 
Posts: 13
Default Functions for "current" & "previous" month to calculate data

Thanks for quick reply and my apologies for not being clear. Just driving me
nuts...
The months are always going to be current month and a month behind due to
data not being available. Not sure if that explains my needs. But I also
would not reference a certain row because the spreadsheet months are entered
column beside column. Other than having to go in and change the formula to
reference current month. Was hoping there was a way to skip that.

"Fred Smith" wrote:

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".