Refer to Named Range on another sheet for IF function

G

Guest

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)
 
R

Ron Rosenfeld

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top