View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default Refer to Named Range on another sheet for IF function

On Fri, 25 Aug 2006 18:42:02 -0700, David
wrote:

I'm sorry this may seem so simple, I've been searching and just can't find
the answer.
I'm trying to do a simple IF function in cell B2 that looks at a cell (B1 -
a date) on the activesheet and looks at a named range on another sheet (Sheet
Name = Holidays, Range = A1:A15, is holiday dates). The holiday range on the
holiday sheet can change so I can use specific cell references. I can't seem
to get the formula to recognize both the page name and the range name in the
formula. Can anyone help? Here is the formula I am trying to use:

=IF(B1=Holidays!'Holidays',1,0)


If the named range on the Holidays sheet is named Holidays, try this:

=COUNTIF(Holidays,B1)


--ron