ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Refer to Named Range on another sheet for IF function (https://www.excelbanter.com/excel-worksheet-functions/107182-refer-named-range-another-sheet-if-function.html)

David

Refer to Named Range on another sheet for IF function
 
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)

Ron Rosenfeld

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

David

Refer to Named Range on another sheet for IF function
 
YOU ARE A LIFESAVER!! That got me what I need! Thank you VERY much!!

David

"Ron Rosenfeld" wrote:

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


Ron Rosenfeld

Refer to Named Range on another sheet for IF function
 
On Fri, 25 Aug 2006 19:36:01 -0700, David
wrote:

YOU ARE A LIFESAVER!! That got me what I need! Thank you VERY much!!

David


You're welcome. Glad to help.


--ron


All times are GMT +1. The time now is 06:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com