View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
 
Posts: n/a
Default Can I add an IF statement

"edwardpestian" wrote:
I would like to know if I can add another IF statement to the
following formula. For example IF cell H9 = "Day" then perform
the function.
[....]
=IF(Date=0,"",OFFSET(Data!$E$5,ROW(A1)+100,
MATCH(G8,Data!$F$3:$CT$3,0)))


The short answer is: yes. But your intended logic is not clear.
The following might what you really want:

=if(or(Date=0, H9!="Day"), "", offset(...))

In other words, compute offset(...) only if Date is non-zero __and__
H9 is "Day". Alternatively, the following might be what you want:

=if(and(Date=0, H9!="Day"), "", offset(...))

That is, compute offset(...) if Date is non-zero __or__ H9 is "Day".