Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Coliber
 
Posts: n/a
Default Dates and periods


Hi,

I have a "small" problem with dates-related formula.
SCENARIO
_Period_Range_Worksheet_
Column A - name of a period ie. Period01 2005, Period02 2005 and so on
for the next 50 years (periods are 28 days, rather than monthly, so
there are 13 periods in any given fiscal year)

Column B - start dates for each particular period, corresponding to
column A

Column C - end dates for each particular period, corresponding to
column A and B

Now the problem:
_Calculation_worksheet_
In a separate worksheet I want to be able to enter ANY date (within 50
years range) in column A, and get a proper period and year match from
Period Range worksheet ie. enter January 20, 2007 and get Period 01
2007 in column B.

I tried Index, Match combination - did not work.

The main problem is the the date typed most often falls within the
range of start and end dates for any particualr period, rather than be
an exact match to the start or end date for any particular period.

Any thoughts from you guys ????

Thanks in advance.


--
Coliber
------------------------------------------------------------------------
Coliber's Profile: http://www.excelforum.com/member.php...o&userid=30864
View this thread: http://www.excelforum.com/showthread...hreadid=505400

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
John Michl
 
Posts: n/a
Default Dates and periods

Any chance you could put your list of periods to the right of the date
ranges? If column D equaled column A, then your lookup formula would
be

= VLOOKUP(A1,Period_Range_Worksheet!B1:D1000,3)

Question: Thirteen 28-day periods equals 364 days. What do you do with
extra day (or extra two days during leap year)?

- John

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Coliber
 
Posts: n/a
Default Dates and periods


John,

the problem with vlookup is that the sample date entered will most
likely
NOT be an exact match for any start or end dates of period dates - it
will 99% of time fall between any given start and end date, thus
vlookup will not be able to match the range dates and corresponding
period with sample date.

As to the 1 missing day in a year, the periods exact length is
calculated by the formula
"=IF(AND(A2="P13",DAY(C2+27)<=27,MONTH(C2+27)=12), C2+34,C2+27)"

Thanks for your input and very quick reply.

Coliber :)


--
Coliber
------------------------------------------------------------------------
Coliber's Profile: http://www.excelforum.com/member.php...o&userid=30864
View this thread: http://www.excelforum.com/showthread...hreadid=505400

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
John Michl
 
Posts: n/a
Default Dates and periods

Coliber, it doesn't need to be an exact match as long as you don't have
the FALSE parameter at the end of the formula. Assuming the dates are
in order, VLOOKUP will find the closest value without going over. Try
it. You'll see that it works.

- John

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sandy Mann
 
Posts: n/a
Default Dates and periods

Coliber

With the first of your start dates in B2 on a sheet named "Data"

=INT((C5-Data!B2)/28)*28+Data!B2

will return the start date of the period of a date in C5 of your 'other'
sheet. You can then use this date in your VLOOKUP

--
HTH

Sandy

with @tiscali.co.uk


"Coliber" wrote in
message ...

Hi,

I have a "small" problem with dates-related formula.
SCENARIO
_Period_Range_Worksheet_
Column A - name of a period ie. Period01 2005, Period02 2005 and so on
for the next 50 years (periods are 28 days, rather than monthly, so
there are 13 periods in any given fiscal year)

Column B - start dates for each particular period, corresponding to
column A

Column C - end dates for each particular period, corresponding to
column A and B

Now the problem:
_Calculation_worksheet_
In a separate worksheet I want to be able to enter ANY date (within 50
years range) in column A, and get a proper period and year match from
Period Range worksheet ie. enter January 20, 2007 and get Period 01
2007 in column B.

I tried Index, Match combination - did not work.

The main problem is the the date typed most often falls within the
range of start and end dates for any particualr period, rather than be
an exact match to the start or end date for any particular period.

Any thoughts from you guys ????

Thanks in advance.


--
Coliber
------------------------------------------------------------------------
Coliber's Profile:
http://www.excelforum.com/member.php...o&userid=30864
View this thread: http://www.excelforum.com/showthread...hreadid=505400





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Coliber
 
Posts: n/a
Default Dates and periods


John,

You are right. It worked.

Thanks again,

Coliber :)


John Michl Wrote:
Coliber, it doesn't need to be an exact match as long as you don't have
the FALSE parameter at the end of the formula. Assuming the dates are
in order, VLOOKUP will find the closest value without going over. Try
it. You'll see that it works.

- John



--
Coliber
------------------------------------------------------------------------
Coliber's Profile: http://www.excelforum.com/member.php...o&userid=30864
View this thread: http://www.excelforum.com/showthread...hreadid=505400

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Coliber
 
Posts: n/a
Default Dates and periods


Sandy Mann,

thanks for your solution.

It is good as well.

Coliber


--
Coliber
------------------------------------------------------------------------
Coliber's Profile: http://www.excelforum.com/member.php...o&userid=30864
View this thread: http://www.excelforum.com/showthread...hreadid=505400

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
Caculating Columns Between Certain Dates Dermot New Users to Excel 19 January 11th 06 04:26 PM
Auto Fill Pay Periods bdehning Excel Discussion (Misc queries) 4 December 8th 05 10:06 AM
Calculating an Activities During Periods Of Natural Months and/or Dates Rayco Excel Worksheet Functions 1 October 10th 05 01:30 PM
How do i sum vales of sales falling between certain time periods the_kane Excel Worksheet Functions 6 March 9th 05 11:09 AM
offsetting periods in chart saturnin02 Excel Discussion (Misc queries) 2 January 26th 05 07:53 PM


All times are GMT +1. The time now is 11:22 AM.

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"