Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 202
Default Formula Based on Values in Named Range Q

I have the following formula that produces a Date / Time value
BF1+(540/1440) eg 02/01/2012 09:00

What I wish to do is modify above that if BF1 equals any dates listed
in a named range "Holidays" then the formula would change to
BF1+1+(540/1440)

Its the bit on looking up values in the named range that I can't work
out
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,522
Default Formula Based on Values in Named Range Q

Holiday dates in F:F

=IF(ISNA(MATCH(bf1,F:F,0)),D1,D1+1)+(540/1440)
===========

On Jan 2, 5:14*am, Seanie wrote:
I have the following formula that produces a Date / Time value
BF1+(540/1440) eg 02/01/2012 09:00

What I wish to do is modify above that if BF1 equals any dates listed
in a named range "Holidays" then the formula would change to
BF1+1+(540/1440)

Its the bit on looking up values in the named range that I can't work
out


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,045
Default Formula Based on Values in Named Range Q

On Mon, 2 Jan 2012 03:14:19 -0800 (PST), Seanie wrote:

I have the following formula that produces a Date / Time value
BF1+(540/1440) eg 02/01/2012 09:00

What I wish to do is modify above that if BF1 equals any dates listed
in a named range "Holidays" then the formula would change to
BF1+1+(540/1440)

Its the bit on looking up values in the named range that I can't work
out


In general:

=BF1+SUMPRODUCT(--(Holidays=BF1)) + 540/1440

But also take a look at the WORKDAY function.
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 202
Default Formula Based on Values in Named Range Q

^^^^ Thanks Guys

Don your formula =IF(ISNA(MATCH(bf1,F:F,0)),D1,D1+1)+(540/1440) ,
produces 01/01/12 09:00, not what I expected as BF1= TODAY() i.e.
02/01/2012, so I expected 03/01/12 09:00. Whats the relevance of D1 in
the formula?


Ron, your formula =BF1+SUMPRODUCT(--(Holidays=BF1)) + 540/1440 works a
treat


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,522
Default Formula Based on Values in Named Range Q

On Jan 2, 10:03*am, Seanie wrote:
^^^^ Thanks Guys

Don your formula *=IF(ISNA(MATCH(bf1,F:F,0)),D1,D1+1)+(540/1440) ,
produces 01/01/12 09:00, not what I expected as BF1= TODAY() i.e.
02/01/2012, so I expected 03/01/12 09:00. Whats the relevance of D1 in
the formula?

Ron, your formula =BF1+SUMPRODUCT(--(Holidays=BF1)) + 540/1440 works a
treat


Change d1 to bf1 or use Rons


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,045
Default Formula Based on Values in Named Range Q

On Mon, 2 Jan 2012 08:03:04 -0800 (PST), Seanie wrote:

Ron, your formula =BF1+SUMPRODUCT(--(Holidays=BF1)) + 540/1440 works a
treat


Glad to help. Thanks for the feedback.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
sum of a named range with values based on vlookup results Solutions Manager Excel Worksheet Functions 20 January 31st 09 03:01 AM
Sum values in columns based on values in named range Mikael Andersson Excel Worksheet Functions 10 November 12th 08 09:37 AM
Referencing a named range based upon Range name entry in cell Barb Reinhardt Excel Worksheet Functions 14 June 20th 07 07:19 PM
inserting a named range into new cells based on a named cell Peter S. Excel Discussion (Misc queries) 1 June 4th 06 03:53 AM
Define a range based on another named range Basil Excel Worksheet Functions 2 February 21st 05 01:47 PM


All times are GMT +1. The time now is 12:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"