+ Reply to Thread
Results 1 to 17 of 17

Data separation with referance to 'Time'

Hybrid View

  1. #1
    Registered User
    Join Date
    12-20-2014
    Location
    India
    MS-Off Ver
    office 2007
    Posts
    73

    Exclamation Data separation with referance to 'Time'

    Enclosed sample excel.

    In col A to E, I am getting data from Google finance.

    In G4, G5, G6, it's auto-generated time values changing everyday.

    I wish to split the data with reference to those time values as shown in sample excel.

    Can anyone please help on this ?

    Thanking in advance.
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Data separation with referance to 'Time'

    Your data in column A contains more than one date/time, column G only contains a time. We'll have to assume that colun A is in ascending order so that the formula finds the first time.

    Use a helper column F and in F4 copied down enter
    Formula: copy to clipboard
    =MOD(A4,1)


    Then in H4 copied across and down

    Formula: copy to clipboard
    =INDEX(B$4:B$3763,MATCH($G4,$F$4:$F$3763),1)
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Data separation with referance to 'Time'

    ...otherwise if you want the time from the latest column A date. Then H4 copied across and down

    Formula: copy to clipboard
    =INDEX(B$4:B$3763,MATCH(INT(MAX(A:A))+$G4,$A$4:$A$3763),1)

  4. #4
    Registered User
    Join Date
    12-20-2014
    Location
    India
    MS-Off Ver
    office 2007
    Posts
    73

    Re: Data separation with referance to 'Time'

    @ Richard Buttrey

    Sorry to say, but this formula can give the value corresponding to only one time value i.e. G4
    I am expecting the range starting from A4 to the value corresponding to G4. (as shown in result in sample sheet)
    Anyway, thanks a lot for your kind efforts.

  5. #5
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Data separation with referance to 'Time'

    Quote Originally Posted by chaitreya View Post
    @ Richard Buttrey

    Sorry to say, but this formula can give the value corresponding to only one time value i.e. G4
    I am expecting the range starting from A4 to the value corresponding to G4. (as shown in result in sample sheet)
    Anyway, thanks a lot for your kind efforts.
    The formula I gave you when copied down from H4 will give you a result for any times you happen to have in G4:G...whatever.

    But what you haven't explained is WHICH G4 time do you want? There are 10 days in column A which all have a 10:36 time. The two separate formulae I gave you would return the 10:36 numbers from either 10 June or 23 June, but until you explain which of the 10 dates you want then it's sort of difficult to help further.

  6. #6
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Data separation with referance to 'Time'

    ARRAY formulas in G11 and M11
    In G11
    =IFERROR(INDEX($A$4:$A$3763,SMALL(IF((ROUND(MOD($A$4:$A$3763,1),7)>=ROUND(G$9,7))*(ROUND(MOD($A$4:$A$3763,1),7)<=ROUND(I$9,7)),ROW($A$4:$A$3763),""),ROWS(G$11:G11))-ROW($A$4)+1),"")
    In M11
    =IFERROR(INDEX($A$4:$A$3763,SMALL(IF((ROUND(MOD($A$4:$A$3763,1),7)>=ROUND(M$9,7))*(ROUND(MOD($A$4:$A$3763,1),7)<=ROUND(O$9,7)),ROW($A$4:$A$3763),""),ROWS(M$11:M11))-ROW($A$4)+1),"")
    then drag down.

    in H11 then drag across
    =IF($G11="","",INDEX(B$4:B$3763,MATCH($G11,$A$4:$A$3763,0)))
    in N11 then dragacross
    =IF($M11="","",INDEX(B$4:B$3763,MATCH($M11,$A$4:$A$3763,0)))
    ARRAY formulas should be confirmed with CTrl+Shift+Enter Keys
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    12-20-2014
    Location
    India
    MS-Off Ver
    office 2007
    Posts
    73

    Re: Data separation with referance to 'Time'

    @ kvsrinivasamurthy ,

    Yes, this formula worked, but the problem is, when drag across, it starts with initial values again after time value in G4

  8. #8
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Data separation with referance to 'Time'

    Pl veify ARRAY formulas are entered correctly.Confirmed with Ctrl+Shift+Enter.
    In case still problem is there upload the file showing the problem.

  9. #9
    Registered User
    Join Date
    12-20-2014
    Location
    India
    MS-Off Ver
    office 2007
    Posts
    73

    Re: Data separation with referance to 'Time'

    @ kvsrinivasamurthy ,
    Enclosed, the sample excel you have sent...
    after drag across, pl see after 10:36, it again gives 9:15, 9:16....
    and after 11:57, it again repeats 10:37, 10:38.....

    Instead, I am uploading sample 2 excel.

    Here, the date / time format is exactly same in Col A and col G

    The end result desired is to get OPEN / HIGH / LOW / CLOSE values of a "RANGE"

    for ex, consider first range starting from 12-06-2017 9:15:00 AM (A4) to 12-06-2017 10:36:00 AM (first value in G4)

    For this range, open is B4, High is =MAX(C4:C85), Low is =MIN(D4:D85) and close is E85

    Since, the values in col G will be always changing, so those ranges too.

    Please see if this is possible using any formulas ?

    Thanking in advance.
    Attached Files Attached Files

  10. #10
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Data separation with referance to 'Time'

    Do you want result as in Sample2 file H to K column.

  11. #11
    Registered User
    Join Date
    12-20-2014
    Location
    India
    MS-Off Ver
    office 2007
    Posts
    73

    Re: Data separation with referance to 'Time'

    @ kvsrinivasamurthy ,

    Yes Sir, I would be highly grateful to you if you could help on this.
    I am looking for result as shown in excel sample 2 , H to K column.

  12. #12
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Data separation with referance to 'Time'

    Pl see the changes in the formula table.
    In I1
    =INDEX(B$4:B$3763,MATCH($G4,$A$4:$A$3763,1))
    In J1
    =MAX(INDEX($C$4:$C$3763,MATCH($G4,$A$4:$A$3763,1)):INDEX($C$4:$C$3763,MATCH($H4,$A$4:$A$3763,1)))
    In K1
    =MIN(INDEX($D$4:$D$3763,MATCH($G4,$A$4:$A$3763,1)):INDEX($D$4:$D$3763,MATCH($H4,$A$4:$A$3763,1)))
    In L1
    =INDEX(E$4:E$3763,MATCH($H4,$A$4:$A$3763,1))
    then drag down all.
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    12-20-2014
    Location
    India
    MS-Off Ver
    office 2007
    Posts
    73

    Re: Data separation with referance to 'Time'

    @ kvsrinivasamurthy ,

    Thanks a lot Sir.
    It's a great help for me.

  14. #14
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Data separation with referance to 'Time'

    welcome.Pl mark the thread solved.

  15. #15
    Registered User
    Join Date
    12-20-2014
    Location
    India
    MS-Off Ver
    office 2007
    Posts
    73

    Re: Data separation with referance to 'Time'

    @ kvsrinivasamurthy ,

    Sir, I have marked the thread as 'solved'.
    However, there is a small problem...
    I don't know whether it's right to ask here itself OR start a new thread.
    I have enclosed the sample excel that you had sent.
    In col H, I need the time values in between 9:15 to 15:30 for each days...including 15:30

    and then to be used in col G as you had added TIMEVALUE("0:01:00")

    Can you please help on this ?
    Attached Files Attached Files

  16. #16
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Data separation with referance to 'Time'

    Helper columns K , L & M are used .Pl see file.

    ARRAY formulas below to be confirmed with Ctrl+Shift+Enter keys
    In G13 , the drag down
    =IFERROR(INDEX($K$13:$M$19,IF(OR(ROUND(MOD($H12,1),6)=ROUND($L$10,6),$H12=""),1,SUMPRODUCT(--(FLOOR($H$12:$H12,1)=FLOOR($H12,1)))+1),SUMPRODUCT(--(ROUND(MOD($H$12:$H12,1),6)=ROUND($L$10,6)))+1)+TIMEVALUE("0:01"),"")
    In H13 , the drag down
    =IFERROR(INDEX($K$13:$M$19,IF(OR(ROUND(MOD($H12,1),6)=ROUND($L$10,6),$H12=""),2,SUMPRODUCT(--(FLOOR($H$12:$H12,1)=FLOOR($H12,1)))+2),SUMPRODUCT(--(ROUND(MOD($H$12:$H12,1),6)=ROUND($L$10,6)))+1),"")
    Attached Files Attached Files

  17. #17
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Data separation with referance to 'Time'

    Sorry wrong file attached. Now correct file attached. Pl see.
    Attached Files Attached Files

+ 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. separation of data
    By alireza123456 in forum Excel General
    Replies: 11
    Last Post: 08-06-2016, 07:42 AM
  2. Replies: 3
    Last Post: 05-18-2016, 12:03 PM
  3. Date/Time separation
    By jspenc02 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-10-2013, 02:21 PM
  4. [SOLVED] Date time separation & calculation to get to total hh:mm
    By nur2544 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-09-2013, 03:53 AM
  5. [SOLVED] Data Separation
    By ssakthish in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-11-2013, 02:34 AM
  6. Replies: 3
    Last Post: 05-02-2011, 10:18 AM
  7. data separation
    By oxdude in forum Excel General
    Replies: 2
    Last Post: 03-01-2009, 04:52 PM

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