+ Reply to Thread
Results 1 to 9 of 9

Dato funksjoner

  1. #1
    Registered User
    Join Date
    02-10-2013
    Location
    Norway
    MS-Off Ver
    Office 2010
    Posts
    6

    Dato funksjoner

    Retunere kun verdier for den uken man er i ved hjelp av excel der utvalger er forskjellige datoer over et år.

  2. #2
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Dato funksjoner

    Meget knapphendig beskrivelse du kommer med.
    Har du en tabell med data over et år og vil få fram data fra aktuell uke så kan du jo bruke autofilter og filtrere på dato fra til.

    Jeg har prøvt og gjette meg til va du vil ha og laget et ark med formler utifra det.
    Attached Files Attached Files
    <----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left

    If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
    I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.

  3. #3
    Registered User
    Join Date
    02-10-2013
    Location
    Norway
    MS-Off Ver
    Office 2010
    Posts
    6

    Re: Dato funksjoner

    Takker så mye for hjelpen denne formelen virker utmerket.
    =IF(AND(C6>(TODAY()-WEEKDAY(TODAY();2));C6<=(TODAY()+7-WEEKDAY(TODAY();2)));1;0) ----(viser data for den uken man er inne i )

    Dersom man ønsker den samme formelen å vise data for den måneden man er inne i, hvordan bli det ?

    På forhånd takk.

  4. #4
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Dato funksjoner

    Så bra at det virket.
    Her er månedsformel:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

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

    Re: Dato funksjoner

    Apologies in advance for my Norwegian.....

    inneværende uke.....

    =IF(ABS(C2-WEEKDAY(C2,3)+3-TODAY())<4;1;0)

    inneværende måned

    =IF(C2-DAY(C2)=TODAY()-DAY(TODAY());1;0)
    Audere est facere

  6. #6
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Dato funksjoner

    Kjempesmarte formler der, daddylonglegs. Månedsformeln var riktigt flott og lett of skjønne. Ukeformeln var bare litt før komplisert for meg akkurat nå.



    Jeg insåg plutselig at dette konseptet er jo enkelt og greit og skjønne. Hvorfor fann jeg ikke på det med en gang?

    Uke
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Måned
    Formula: copy to clipboard
    Please Login or Register  to view this content.

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

    Re: Dato funksjoner

    Hello Jacc, I won't try to explain in Norwegian.....

    In this formula

    =IF(ABS(C2-WEEKDAY(C2,3)+3-TODAY())<4;1;0)

    C2-WEEKDAY(C2;3)+3 will always give the Thursday date within the same week as C2. As Thursday is the midpoint of the week then if you subtract today's date from that date the difference (+ or -) will always be within 3 days if today is in the same week, hence:

    =ABS(C2-WEEKDAY(C2;3)+3-TODAY())<4

    I'd be wary about using your WEEKNUM version because it won't work when a Monday - Sunday week spans two different calendar years
    Last edited by daddylonglegs; 02-24-2013 at 12:14 PM.

  8. #8
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Dato funksjoner

    Good explanation, thanks!
    Yes you are of course right about the week number system, it can't be trusted. The ISO week system is ignored by most and certainly by Excel.

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

    Re: Dato funksjoner

    You can get ISO week numbers in Excel 2010 with

    =WEEKNUM(Date,21)

    or it's more explicit in Excel 2013 with

    =ISOWEEKNUM(Date)

    but even with those you can't easily know that date is also in the same "year"........

+ 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