Thread: IF STATEMENT
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Lars-Åke Aspelin[_2_] Lars-Åke Aspelin[_2_] is offline
external usenet poster
 
Posts: 913
Default IF STATEMENT

On Thu, 10 Jul 2008 12:34:15 -0700, charlie
wrote:

I need a formula that looks at a cell and if it's not empty it preforms the
following function:
=IF(B17=B2,1,SUM(MONTH($B$2)-MONTH(B17))

B2 is set for 6/1/08, so right now if the cell is blank it returns a 5, but
I only want it to do the calculation if there's a date in the cell. How can
I add another IF statement to this to say IF(B170) then look at the above
function???


Try this:

=IF(ISBLANK(B17), "" , your original formula goes here )

that is

=IF(ISBLANK(B17), "" , IF(B17=B2, 1, MONTH($B$2)-MONTH(B17) )

Hope this helps / Lars-Åke