+ Reply to Thread
Results 1 to 12 of 12

RE: Data Format Help

  1. #1
    Registered User
    Join Date
    08-28-2014
    Location
    Melbourne
    MS-Off Ver
    2011
    Posts
    8

    RE: Data Format Help

    Hey!

    How can I point a formula to read DAYS opposed to the underlying date/numbers?

    e.g
    Cell Contents = numeric, 42298
    Formatted to appear as days (Mon, Tue, Wed, Thu, Fri, Sat, Sun)

    When writing VLOOKUP, etc. I want to lookup the DAY (Mon, Tue, etc.) value.

    Any ideas?

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,651

    Re: Data Format Help

    If A1 contains date in numeric, use TEXT to convert it to be weekday in text

    Try : =VLOOKUP(TEXT(A1,"ddd"),Lookup_range,n,0)
    Quang PT

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Data Format Help

    What exactly are you trying to do here?

    Without seeing as sample of what you are working with, hard to give exact suggestions, but just because the cell saysw Monday, the underlying value is still a 5-digit value - formatting only changes the cosmetics of teh cell, not it's contents.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    08-28-2014
    Location
    Melbourne
    MS-Off Ver
    2011
    Posts
    8

    Re: Data Format Help

    I'm trying tooooo

    Calculates Hours worked, multiplied by relevant rate, as they are 'VLOOKUP' to corresponding Mon, Tue, Wed.

    The objective is to have Monday filled out with all staff working Monday, between 8am and 6pm (24hr time) multiplied by relevant day/night rate as per their worker status, full time, part time, salary, etc.

    Obviously this is impossible if the formula can't be directed toward a Mon->Sun, as every date will have a different 5 digit figure.

    Untitled.png

  5. #5
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,651

    Re: Data Format Help

    Try to upload a sample worksheet instead of image.

  6. #6
    Registered User
    Join Date
    08-28-2014
    Location
    Melbourne
    MS-Off Ver
    2011
    Posts
    8

    Re: Data Format Help

    aerggre.xlsx

    Hopefully this is better =)

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Data Format Help

    I think this will be far simpler if you can add some helper column in. It can probably be done without them, but the formulas will become extremely complicated. I added 1 helper top calc the time worked and another to ID the day...

    M
    N
    O
    P
    Q
    R
    S
    T
    2
    Status Date Start Time Finish Time Day Start Day Finish
    3
    P
    Mon 19/10/2015
    3:30
    8:00
    8:00
    18:00
    Mon
    4:30
    4
    F
    Mon 19/10/2015
    8:00
    16:36
    Mon
    8:36
    5
    S
    Mon 19/10/2015
    8:00
    16:36
    Mon
    8:36
    6
    P
    Mon 19/10/2015
    9:00
    17:00
    Mon
    8:00
    7
    F
    Mon 19/10/2015
    16:24
    0:00
    Mon
    7:36
    8
    F
    Mon 19/10/2015
    16:24
    0:00
    Mon
    7:36
    9
    C
    Mon 19/10/2015
    16:30
    0:00
    Mon
    7:30
    10
    P
    Mon 19/10/2015
    22:30
    3:30
    Mon
    5:00
    11
    P
    Tue 20/10/2015
    3:30
    8:00
    Tue
    4:30
    12
    F
    Tue 20/10/2015
    8:00
    16:36
    Tue
    8:36
    13
    S
    Tue 20/10/2015
    8:00
    16:36
    Tue
    8:36
    14
    P
    Tue 20/10/2015
    9:00
    17:00
    Tue
    8:00
    15
    F
    Tue 20/10/2015
    16:24
    0:00
    Tue
    7:36

    S3=TEXT(N3,"ddd")
    T3=MOD(P3-O3,1)
    copied down as needed.

    then to start your calc...
    B
    C
    D
    E
    F
    G
    H
    I
    J
    8
    Mon
    Tue Wed Thu Fri
    Sat
    Sun
    Pub
    9
    C
    0.31
    0.00
    0.00
    0.00
    0.00
    0.00
    0.00
    0.00
    10
    P
    0.73
    0.52
    0.00
    0.00
    0.00
    0.00
    0.00
    0.00
    11
    S
    0.36
    0.36
    0.00
    0.00
    0.00
    0.00
    0.00
    0.00
    12
    F
    0.99
    0.68
    0.00
    0.00
    0.00
    0.00
    0.00
    0.00

    C9=SUMIFS($T$3:$T$15,$M$3:$M$15,$B9,$S$3:$S$15,C$8)
    copied down and across

  8. #8
    Registered User
    Join Date
    08-28-2014
    Location
    Melbourne
    MS-Off Ver
    2011
    Posts
    8

    Re: Data Format Help

    Just wanted to say thanks very much for the swift help!

    I'll have a play tomorrow and see how I go with it, it will definitely help!

  9. #9
    Registered User
    Join Date
    08-28-2014
    Location
    Melbourne
    MS-Off Ver
    2011
    Posts
    8

    Re: Data Format Help

    V23.xlsx

    Any idea how to have the day and night hours calculate the total hours attributable to day at night in columns K & L based on the Day Start and Day Finish Hours in G and H columns (all hours outside G & H hours is night shift).

  10. #10
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,651

    Re: Data Format Help

    Does FDibbins' solution in #7 work?

    P/S: Never mind upper question.
    So now you have other raising issue. I am working with it.
    Last edited by bebo021999; 12-01-2015 at 11:09 PM.

  11. #11
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,651

    Re: Data Format Help

    Day time, cell L3:

    Please Login or Register  to view this content.
    Night time, cell K3:

    =($E3+($E3<$C3)*1-$C3)*24-L3

  12. #12
    Registered User
    Join Date
    08-28-2014
    Location
    Melbourne
    MS-Off Ver
    2011
    Posts
    8

    Re: Data Format Help

    Thanks very much! Helps a ton!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] about restructure repeated measure data into long format from wide format
    By sohel_for in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-18-2015, 01:10 AM
  2. Autopopulate Format from data (format needs to be flexible with additional data)
    By Evilbober in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-21-2014, 04:58 PM
  3. [SOLVED] Require vba or formula for convert general format data in date format
    By santosh226001 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-10-2013, 03:53 AM
  4. reorganizing data from pivot table format to a format more suitable for presentations
    By pwent_1975@yahoo.com in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-12-2013, 01:41 PM
  5. Replies: 0
    Last Post: 03-23-2012, 04:28 PM
  6. How to Convert Matrix format data into tabular format data
    By nishchints in forum Excel General
    Replies: 1
    Last Post: 02-22-2012, 03:53 PM
  7. Lock Cell Format - Allow copy and paste of data without format change
    By Chris12InKC in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-11-2006, 12:50 AM

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