#1   Report Post  
Posted to microsoft.public.excel.misc
Beertje
 
Posts: n/a
Default Formula needed.

My first sheet (called Data) contains following information:
Col A Col B Col C Col D
Part 1 5 Date =weeknum(C1) i.e. 46
Part 2 6 Date 46
Part 1 4 Date 46
Part 1 5 Date 47
This list is filled with more rows with the same week number.

On another sheet (called Summary) I try to summarize the data like following:
Col A Col B Col C Col D
46 47 Formula Formula

I need a formula for this row, which automatically fills in the next week
number if it shows up in my database (only column per week). I.e. as soon as
in column D of the Data sheet the next week number shows up (here 48) it is
automatically shown in Col C of my summary sheet etc.

Who can help me with this formula?

  #2   Report Post  
Posted to microsoft.public.excel.misc
Duke Carey
 
Posts: n/a
Default Formula needed.

I'm assuming 47 is in B2, so in C2 use

=IF(MAX(Data!D:D)=B2+1,B2+1,"")

"Beertje" wrote:

My first sheet (called Data) contains following information:
Col A Col B Col C Col D
Part 1 5 Date =weeknum(C1) i.e. 46
Part 2 6 Date 46
Part 1 4 Date 46
Part 1 5 Date 47
This list is filled with more rows with the same week number.

On another sheet (called Summary) I try to summarize the data like following:
Col A Col B Col C Col D
46 47 Formula Formula

I need a formula for this row, which automatically fills in the next week
number if it shows up in my database (only column per week). I.e. as soon as
in column D of the Data sheet the next week number shows up (here 48) it is
automatically shown in Col C of my summary sheet etc.

Who can help me with this formula?

  #3   Report Post  
Posted to microsoft.public.excel.misc
Beertje
 
Posts: n/a
Default Formula needed.

Duke,

this only works once. As soon as D2 is filled using the same formula =C2+1m
C2 blanks since the max of D:D is greater then B2+1.

"Duke Carey" wrote:

I'm assuming 47 is in B2, so in C2 use

=IF(MAX(Data!D:D)=B2+1,B2+1,"")

"Beertje" wrote:

My first sheet (called Data) contains following information:
Col A Col B Col C Col D
Part 1 5 Date =weeknum(C1) i.e. 46
Part 2 6 Date 46
Part 1 4 Date 46
Part 1 5 Date 47
This list is filled with more rows with the same week number.

On another sheet (called Summary) I try to summarize the data like following:
Col A Col B Col C Col D
46 47 Formula Formula

I need a formula for this row, which automatically fills in the next week
number if it shows up in my database (only column per week). I.e. as soon as
in column D of the Data sheet the next week number shows up (here 48) it is
automatically shown in Col C of my summary sheet etc.

Who can help me with this formula?

  #4   Report Post  
Posted to microsoft.public.excel.misc
Max
 
Posts: n/a
Default Formula needed.

Another play to try ..

In sheet: Data
-------------
Assume data starts in row1 down, col C contains dates & col D houses
formulas filled down (in D1: =weeknum(C1)) progressively

Use an adjacent col, say col E?
Put in E1: =IF(C1="","",IF(COUNTIF($D$1:D1,D1)1,"",ROW()))
Copy down to say, E200, to cover the max expected range in col C

Then in sheet: Summary
-----------------------
Put in say, A2:

=IF(ISERROR(SMALL(Data!$E:$E,COLUMN(A1))),"",
INDEX(Data!$D:$D,
MATCH(SMALL(Data!$E:$E,COLUMN(A1)),Data!$E:$E,0)))

Copy A2 across 104 cols to say, CZ2,
to cover 2 years worth of week#'s

A2:CZ2 will be progressively filled
with the week# from "Data" as desired
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--


  #5   Report Post  
Posted to microsoft.public.excel.misc
Beertje
 
Posts: n/a
Default Formula needed.

Max,
one issue remains
week 46, 47 ,48, 49 no problem from left to right, but now when week 1 of
next year starts it is put at the left of week 46, so my sequence gets mixed
up.

how to solve this? Can we include the year?

Thanks

"Max" wrote:

Another play to try ..

In sheet: Data
-------------
Assume data starts in row1 down, col C contains dates & col D houses
formulas filled down (in D1: =weeknum(C1)) progressively

Use an adjacent col, say col E?
Put in E1: =IF(C1="","",IF(COUNTIF($D$1:D1,D1)1,"",ROW()))
Copy down to say, E200, to cover the max expected range in col C

Then in sheet: Summary
-----------------------
Put in say, A2:

=IF(ISERROR(SMALL(Data!$E:$E,COLUMN(A1))),"",
INDEX(Data!$D:$D,
MATCH(SMALL(Data!$E:$E,COLUMN(A1)),Data!$E:$E,0)))

Copy A2 across 104 cols to say, CZ2,
to cover 2 years worth of week#'s

A2:CZ2 will be progressively filled
with the week# from "Data" as desired
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--





  #6   Report Post  
Posted to microsoft.public.excel.misc
Max
 
Posts: n/a
Default Formula needed.

"Beertje" wrote:
.. but now when week 1 of next year starts
it is put at the left of week 46,
so my sequence gets mixed up.
how to solve this? Can we include the year?


Not sure what you meant by the above, but perhaps this suggested amendment
to the formulae in col D in Data to include the week# and the year in the
display (" ##-yyyy") would work out ok ?

In sheet: Data
------------
Put instead in D1, and copy down:
=TEXT(weeknum(C1),"00")&"-"&TEXT(C1,"yyyy")

(Col E's formulae unchanged)

Then in sheet: Summary
with row2's formulae unchanged
it'll appear in A2 across as:

46-2005, 47-2005, ... 53-2005, 01-2006

Here's a quick sample for the above construct:
http://cjoint.com/?lDjJTMYIis
Beertje_misc.xls
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--


  #7   Report Post  
Posted to microsoft.public.excel.misc
Beertje
 
Posts: n/a
Default Formula needed.

Thanks. It works.

"Max" wrote:

"Beertje" wrote:
.. but now when week 1 of next year starts
it is put at the left of week 46,
so my sequence gets mixed up.
how to solve this? Can we include the year?


Not sure what you meant by the above, but perhaps this suggested amendment
to the formulae in col D in Data to include the week# and the year in the
display (" ##-yyyy") would work out ok ?

In sheet: Data
------------
Put instead in D1, and copy down:
=TEXT(weeknum(C1),"00")&"-"&TEXT(C1,"yyyy")

(Col E's formulae unchanged)

Then in sheet: Summary
with row2's formulae unchanged
it'll appear in A2 across as:

46-2005, 47-2005, ... 53-2005, 01-2006

Here's a quick sample for the above construct:
http://cjoint.com/?lDjJTMYIis
Beertje_misc.xls
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--



  #8   Report Post  
Posted to microsoft.public.excel.misc
Max
 
Posts: n/a
Default Formula needed.

Glad to hear that !
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"Beertje" wrote in message
...
Thanks. It works.



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
continuous sum formula needed NN Excel Discussion (Misc queries) 2 November 4th 05 06:49 PM
Formula Help Needed BDY Excel Discussion (Misc queries) 3 October 26th 05 05:35 PM
More Help Needed with Count formula Greegan Excel Worksheet Functions 4 July 31st 05 06:31 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 07:48 PM
Help! Formula needed. Samrasr Excel Discussion (Misc queries) 1 January 26th 05 12:01 PM


All times are GMT +1. The time now is 04:41 AM.

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

About Us

"It's about Microsoft Excel"