+ Reply to Thread
Results 1 to 15 of 15

Excel 2007 : Need corresponding Week Number and Week Begining Date to appear next to data search

  1. #1
    Registered User
    Join Date
    02-13-2012
    Location
    Coventry
    MS-Off Ver
    Excel 2007
    Posts
    12

    Need corresponding Week Number and Week Begining Date to appear next to data search

    I was very helpfully assisted earlier by a few people on here. Here is the next challenge.

    The attached spreadsheet searches for non-zeros in a lis and displays them in column E. In column D, I need the corresponding week number and in column F the corresponding week begining date. I've tried pulling apart the folumula in column E to try and index this but my efforts are now turning into dead time.

    As before, any help much appreciated.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    02-13-2012
    Location
    Coventry
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Need corresponding Week Number and Week Begining Date to appear next to data sear

    I'm guessing no-one has had any ideas on this so far. If anything springs to mind today please let me know.

    Many thanks

  3. #3
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Need corresponding Week Number and Week Begining Date to appear next to data sear

    Hi
    I have trouble opening your example sheet.
    Can you please re-post it?
    Thx

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Need corresponding Week Number and Week Begining Date to appear next to data sear

    Hi

    If i get your point, then pls try this.

    In D2>>=WEEKNUM(C2) Copy down

    In F2>>=C2-WEEKDAY(C2)+2 Copy down.

    Monday=First day of the week.

    Hope to helps you.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  5. #5
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Need corresponding Week Number and Week Begining Date to appear next to data sear

    Datadog, please disregard my post, problem is at my place - Sorry

  6. #6
    Registered User
    Join Date
    02-13-2012
    Location
    Coventry
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Need corresponding Week Number and Week Begining Date to appear next to data sear

    Sorry try this one. It's 97 - 2003 format.
    Attached Files Attached Files

  7. #7
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Need corresponding Week Number and Week Begining Date to appear next to data sear

    May i ask if you saw my suggestion??

  8. #8
    Registered User
    Join Date
    02-13-2012
    Location
    Coventry
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Need corresponding Week Number and Week Begining Date to appear next to data sear

    Yeah doesn't quite do the job. What columns D and F need to do is look at the cell next to it in column E and say 'Ah, now thats drawn from row 4/5/6/7' etc and pull the corresponding week number and week begining date from columns A and C. Hope that makes sense.

  9. #9
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Need corresponding Week Number and Week Begining Date to appear next to data sear

    Can you give us an example?

    Which is the result that you expect in D2 AND E2 and what in D3 AND E3??

  10. #10
    Registered User
    Join Date
    02-13-2012
    Location
    Coventry
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Need corresponding Week Number and Week Begining Date to appear next to data sear

    In the example uploaded, Cell D2 would be week 4, D3 would return 5, D4 would return 14, D5 would return 17. Column E would be E2 = 22/06/2010, E3 = 29/06/2010, E4 = 31/08/2010.

    Basically Column E looks at column B and skips between all the number greater than zero in order of their appearance, displaying them with the zeros in between gone. The corresponding week numbers and week begining dates need to appear next to them.

  11. #11
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Need corresponding Week Number and Week Begining Date to appear next to data sear

    ..Ok.. for column E, we need a simple INDEX&MATCH..

    But for D,...sorry i can not follow you. I can not find the reason d2(for example) to return 4, etc....so to try to built a formula.

    I think both of us have to wait for an answer....!

  12. #12
    Registered User
    Join Date
    02-13-2012
    Location
    Coventry
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Need corresponding Week Number and Week Begining Date to appear next to data sear

    I'm meeting with my boss late to discuss this. If an answer comes along I'll post it for anyone that is intereted or as frustrated withnot knowing the answer as I am!

  13. #13
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Need corresponding Week Number and Week Begining Date to appear next to data sear

    Isn't that just
    D2: =IF(ROW(1:1)>COUNTIF(B$2:B$157,">0"),"",INDEX(A:A,LARGE(INDEX(ROW(B$2:B$157)*(B$2:B$157>0),0),COUNTIF(B$2:B$157,">0")-(ROW(1:1)-1))))
    F2: =IF(ROW(1:1)>COUNTIF($B$2:$B$157,">0"),"",INDEX(C:C,LARGE(INDEX(ROW($B$2:$B$157)*($B$2:$B$157>0),0),COUNTIF($B$2:$B$157,">0")-(ROW(1:1)-1))))

    and fill down?
    Good luck.

  14. #14
    Registered User
    Join Date
    02-13-2012
    Location
    Coventry
    MS-Off Ver
    Excel 2007
    Posts
    12

    [SOLVED]Need corresponding Week Number and Week Begining Date to appear....

    This was so ridiculously simple in the end. It was just a case of adding an offset to the second half of the command in column E. It only took almost a whole day to figure that one out!
    Attached Files Attached Files

  15. #15
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Need corresponding Week Number and Week Begining Date to appear next to data sear

    Her's a different approach to simplify......

    As your week numbers are in ascending order then perhaps use this formula in D2 copied down

    =IF(D1="","",IFERROR(INDEX(A$2:A$157,MATCH(1,INDEX((B$2:B$157>0)*(A$2:A$157>N(D1)),0),0)),""))

    Then for the other data you can use VLOOKUP, i.e. in E2 copied to F2 and then down both columns

    =IF($D2="","",VLOOKUP($D2,$A$2:$C$157,COLUMNS($E2:E2)+1,0))
    Audere est facere

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1