Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default calculating a pattern

Using the following pattern:

DATE = ANSWER
---------- ------
12/16/2007 = 1A
12/17/2007 = 2A
12/18/2007 = 3A
12/19/2007 = 1B
12/20/2007 = 2B
12/21/2007 = 3B
12/22/2007 = 1A
12/23/2007 = 2A
12/24/2007 = 3A
12/25/2007 = 1B
12/26/2007 = 2B
12/27/2007 = 3B
12/28/2007 = 1A
12/29/2007 = 2A
12/30/2007 = 3A

how can I calculate the "ANSWER" when "DATE" = January 27, 2008?

DATE = ANSWER
---------- ------
1/27/2008 = ?


or any other date for that matter?


Thank you.
Jim O:)
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default calculating a pattern

One thought

Assuming the first 6 lines below
are within A2:B7, viz:

12/16/2007 = 1A
12/17/2007 = 2A
12/18/2007 = 3A
12/19/2007 = 1B
12/20/2007 = 2B
12/21/2007 = 3B


Select A2:B7, fill down to propagate the series for future dates as far as
required. Then just use a simple vlookup on the input date,
eg with input date in D2 down: 12/21/2007
Put in E2: =IF(D2="","",VLOOKUP(D2,A:B,2,0))
Copy down
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"jimo" wrote in message
...
Using the following pattern:

DATE = ANSWER
---------- ------
12/16/2007 = 1A
12/17/2007 = 2A
12/18/2007 = 3A
12/19/2007 = 1B
12/20/2007 = 2B
12/21/2007 = 3B
12/22/2007 = 1A
12/23/2007 = 2A
12/24/2007 = 3A
12/25/2007 = 1B
12/26/2007 = 2B
12/27/2007 = 3B
12/28/2007 = 1A
12/29/2007 = 2A
12/30/2007 = 3A

how can I calculate the "ANSWER" when "DATE" = January 27, 2008?

DATE = ANSWER
---------- ------
1/27/2008 = ?


or any other date for that matter?


Thank you.
Jim O:)



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default calculating a pattern

Enter the date to find in A1, then try this:

=CHOOSE(MOD(A1,6)+1,"1A","2A","3A","1B","2B","3B")

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"jimo" wrote in message
...
Using the following pattern:

DATE = ANSWER
---------- ------
12/16/2007 = 1A
12/17/2007 = 2A
12/18/2007 = 3A
12/19/2007 = 1B
12/20/2007 = 2B
12/21/2007 = 3B
12/22/2007 = 1A
12/23/2007 = 2A
12/24/2007 = 3A
12/25/2007 = 1B
12/26/2007 = 2B
12/27/2007 = 3B
12/28/2007 = 1A
12/29/2007 = 2A
12/30/2007 = 3A

how can I calculate the "ANSWER" when "DATE" = January 27, 2008?

DATE = ANSWER
---------- ------
1/27/2008 = ?


or any other date for that matter?


Thank you.
Jim O:)



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default calculating a pattern

Looks like you hit it on the head, RagDyer!
This will help create a work shift calculator for firefighters.
I'm going to try and understand the "CHOOSE" and "MOD" functions now.


On Dec 3, 3:33 pm, "RagDyer" wrote:
Enter the date to find in A1, then try this:

=CHOOSE(MOD(A1,6)+1,"1A","2A","3A","1B","2B","3B")

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------"jimo" wrote in message

...

Using the following pattern:


DATE = ANSWER
---------- ------
12/16/2007 = 1A
12/17/2007 = 2A
12/18/2007 = 3A
12/19/2007 = 1B
12/20/2007 = 2B
12/21/2007 = 3B
12/22/2007 = 1A
12/23/2007 = 2A
12/24/2007 = 3A
12/25/2007 = 1B
12/26/2007 = 2B
12/27/2007 = 3B
12/28/2007 = 1A
12/29/2007 = 2A
12/30/2007 = 3A


how can I calculate the "ANSWER" when "DATE" = January 27, 2008?


DATE = ANSWER
---------- ------
1/27/2008 = ?


or any other date for that matter?


Thank you.
Jim O:)


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default calculating a pattern

Appreciate the feed-back.

Actually, both the Choose() and Mod() functions are pretty straight forward,
as you can find out by looking in the Help files.

It's really just the mathematical adjustment to Mod to make it return the
number series (1 to 6) that you need to feed the Choose function.
--
Regards,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"jimo" wrote in message
...
Looks like you hit it on the head, RagDyer!
This will help create a work shift calculator for firefighters.
I'm going to try and understand the "CHOOSE" and "MOD" functions now.


On Dec 3, 3:33 pm, "RagDyer" wrote:
Enter the date to find in A1, then try this:

=CHOOSE(MOD(A1,6)+1,"1A","2A","3A","1B","2B","3B")

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------"jimo"
wrote in message

...

Using the following pattern:


DATE = ANSWER
---------- ------
12/16/2007 = 1A
12/17/2007 = 2A
12/18/2007 = 3A
12/19/2007 = 1B
12/20/2007 = 2B
12/21/2007 = 3B
12/22/2007 = 1A
12/23/2007 = 2A
12/24/2007 = 3A
12/25/2007 = 1B
12/26/2007 = 2B
12/27/2007 = 3B
12/28/2007 = 1A
12/29/2007 = 2A
12/30/2007 = 3A


how can I calculate the "ANSWER" when "DATE" = January 27, 2008?


DATE = ANSWER
---------- ------
1/27/2008 = ?


or any other date for that matter?


Thank you.
Jim O:)




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
Pattern Matching [email protected] Excel Discussion (Misc queries) 6 September 24th 07 09:19 PM
Get rid of pattern smackedass Excel Discussion (Misc queries) 1 October 1st 06 12:38 AM
how do i add a pattern to cells skater_element_2008 Excel Discussion (Misc queries) 2 February 10th 06 04:07 PM
Calculating recurring date in following month, calculating # days in that period Walterius Excel Worksheet Functions 6 June 4th 05 11:21 PM
weekday pattern MichaelSedley Excel Discussion (Misc queries) 6 April 4th 05 05:47 AM


All times are GMT +1. The time now is 01:43 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"