Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-24-2017, 03:30 PM
H28Sailor H28Sailor is offline Condensing financial data Windows 7 32bit Condensing financial data Office 2007
Advanced Beginner
Condensing financial data
 
Join Date: Mar 2013
Posts: 55
H28Sailor is on a distinguished road
Default Condensing financial data

Hi

I have one minute financial data of the form:-

20010102, 230300, OP, HP, LP, CP

where OP = Open Price , HP = High Price, LP = Low Price, CP = Close Price
and Date = YYYYMMDD, and Time = HHMMSS

However, some minute data does not exist i.e. there are a variable number of minute data to make up each hour

I would like to condense the minute data into hourly data such that

(i) OP becomes OP for 1st available minute data for that hour
(ii) HP becomes max(of all available HP's) for that hour span
(iii) LP becomes min(of all available LPs) for that hour span
(iv) CP becomes CP for last available minute data for that hour

Any suggestions for the appropriate formulae gratefully received

Thank you

Bob M

p.s. if the fields were separated into their own columns and there were say 6 rows per minute I could use the following:-
OP: =OFFSET(Sheet1!C$2,(ROW()-1)*6-6,0)
HP: =MAX(OFFSET(Sheet1!D$2,(ROW()-1)*6-6,0,6,1))
LP: =MIN(OFFSET(Sheet1!E$2,(ROW()-1)*6-6,0,6,1))


CP: =OFFSET(Sheet1!F$2,(ROW()-1)*6-1,0)

but I do not know how to accommodate the variable number of rows per minute











Last edited by H28Sailor; 03-25-2017 at 12:03 AM. Reason: adding suggestions
Reply With Quote
  #2  
Old 03-25-2017, 12:49 AM
xor xor is offline Condensing financial data Windows 10 Condensing financial data Office 2016
Expert
 
Join Date: Oct 2015
Posts: 1,097
xor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to all
Default

Could you possibly upload the file (click Go Advanced)?
Reply With Quote
  #3  
Old 03-25-2017, 01:08 AM
H28Sailor H28Sailor is offline Condensing financial data Windows 7 32bit Condensing financial data Office 2007
Advanced Beginner
Condensing financial data
 
Join Date: Mar 2013
Posts: 55
H28Sailor is on a distinguished road
Default

file attached
Attached Files
File Type: xlsx tick_testing.xlsx (460.0 KB, 13 views)
Reply With Quote
  #4  
Old 03-25-2017, 01:23 AM
xor xor is offline Condensing financial data Windows 10 Condensing financial data Office 2016
Expert
 
Join Date: Oct 2015
Posts: 1,097
xor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to all
Default

Thanks - could you please give some examples of expected results?
Reply With Quote
  #5  
Old 03-25-2017, 01:40 AM
H28Sailor H28Sailor is offline Condensing financial data Windows 7 32bit Condensing financial data Office 2007
Advanced Beginner
Condensing financial data
 
Join Date: Mar 2013
Posts: 55
H28Sailor is on a distinguished road
Default

e.g.

3 jan 2001
01 minute - 110 rows condensed
02 minute - 56 rows condensed
03 minute 56 rows condensed
04 minute - 59 rows condensed

04 minute values
OP:- 114.58 from very first row
HP:- 114.60 from 7th row
LP:- 114.53 from any of seven rows (incl. last row)
CP:- 114.53 from very last row
Reply With Quote
  #6  
Old 03-25-2017, 01:57 AM
xor xor is offline Condensing financial data Windows 10 Condensing financial data Office 2016
Expert
 
Join Date: Oct 2015
Posts: 1,097
xor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to all
Default

I regret, but I don't know how to help.
Reply With Quote
  #7  
Old 03-25-2017, 02:49 PM
Logit Logit is offline Condensing financial data Windows 10 Condensing financial data Office 2007
Expert
 
Join Date: Jan 2017
Posts: 533
Logit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the rough
Default

To separate the data into individual columns, DATA TAB (up top Excel 2007) - TEXT TO COLUMNS.

When you get to the Delimiter type choose COMMA.

First, highlight all of Col A, then take the above steps.
Attached Files
File Type: zip tick_testing (2).zip (1.04 MB, 8 views)
Reply With Quote
  #8  
Old 03-25-2017, 09:09 PM
NoSparks NoSparks is offline Condensing financial data Windows 7 64bit Condensing financial data Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 831
NoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really nice
Default

Is it reasonable to think that your expected results posted in #5 are for hours 01, 02, 03 & 04 and the rows for hour 01 would be 54 ?

Are you interested in a macro/vba solution ?
Reply With Quote
  #9  
Old 04-01-2017, 03:42 PM
H28Sailor H28Sailor is offline Condensing financial data Windows 7 32bit Condensing financial data Office 2007
Advanced Beginner
Condensing financial data
 
Join Date: Mar 2013
Posts: 55
H28Sailor is on a distinguished road
Default

Hi

Not clear what results you are referring to................

Yes - would appreciate a macro solution
Bob M
Reply With Quote
  #10  
Old 04-01-2017, 05:53 PM
NoSparks NoSparks is offline Condensing financial data Windows 7 64bit Condensing financial data Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 831
NoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really nice
Default

This macro solution uses 3 separate macros all called from the first.

first:
creates a temporary sheet
distributes the data to columns

second:
creates lists of unique dates and hours

third:
a loop within a loop filters by date and hour
numbers extracted and written to separate sheet
deletes the temp sheet when finished

Your sample data of 28,707 records requires 624 filters being applied and removed.
Results in 501 lines being written to the sheet.
Takes an eternity to run (43 seconds on my computer).
Sorry, I'm not sharp enough to speed that up.

Zipped due to file being just over 500 KB.
Attached Files
File Type: zip tick_testing.zip (323.2 KB, 12 views)
Reply With Quote
  #11  
Old 04-01-2017, 07:56 PM
H28Sailor H28Sailor is offline Condensing financial data Windows 7 32bit Condensing financial data Office 2007
Advanced Beginner
Condensing financial data
 
Join Date: Mar 2013
Posts: 55
H28Sailor is on a distinguished road
Default

Hi

You are brilliant

Exactly does what I wanted

Many thanks

Bob M
Reply With Quote
  #12  
Old 04-01-2017, 08:58 PM
NoSparks NoSparks is offline Condensing financial data Windows 7 64bit Condensing financial data Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 831
NoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really nice
Default

You're welcome.

If that looks after your original request please mark the thread as solved.
Supposedly there is something in the Thread Tools drop down near the top of the page for this.

Thanks
NoSparks
Reply With Quote
  #13  
Old 04-01-2017, 09:36 PM
H28Sailor H28Sailor is offline Condensing financial data Windows 7 32bit Condensing financial data Office 2007
Advanced Beginner
Condensing financial data
 
Join Date: Mar 2013
Posts: 55
H28Sailor is on a distinguished road
Default

Hi
can't see how to
Reply With Quote
  #14  
Old 04-02-2017, 12:00 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Condensing financial data Windows 7 64bit Condensing financial data Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,771
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

Marked solved
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
Reply

Tags
condensing data



Similar Threads
Thread Thread Starter Forum Replies Last Post
Condensing financial data Condensing MS word document Taylor Word 1 11-22-2012 01:09 AM
Condensing a spread sheet hawkeyefxr Excel 4 08-22-2012 05:17 AM
Condensing financial data Financial Data Organization captain_hawkeye Excel 1 06-14-2010 04:09 AM
Condensing financial data Federal financial rounding? markg2 Excel 6 05-26-2010 09:54 AM
Formatting financial ratios jtrobinson Word 0 01-19-2010 06:46 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:02 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft