Stock data arrange in 5 min interval.........

ianccy

Active Member
Joined
Jul 28, 2002
Messages
332
I have a workbook that has stock data gathered from some site its in seconds interval, i want it to be arranged in 5 min intervals, the time format from the data is in hmmss00 as from the file downloaded. From the file,the data is arranged as Date, Name of the stock, ending date(not needed), Time, Price, Volume. how to arrange it so that my data starts from 08:45 ( data gather from 8:45 to 8:49), 08:50, 08:55,.....etc, and the data should be created as in Date(mm/dd), Time(hh:mm), Volume, Open price, High price, low price, close price. (High price of 08:45 is the highest price from 08:45:00 to 08:49:99), etc. if you can, please email me the excel file
This message was edited by ianccy on 2002-08-27 03:09
 
1. the round up time is what i wanted, but it couldnot be used as the Vlookup function. i think i would go for a different approach, like maintaining the 8 digit time format as in column H, but make s it round up to nearest 5 min 8 digits, is this possible? then i could use the vlookup for it?

2. Column J is the bid price or stock price.
3. Only the time is sorted and the price are in random order. The time has to be sorted so i can extract the start price and the last price
 
Upvote 0

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Ian,

see if this works for you:

Problem Assumptions
Bid item names are in column B
Bid times are in column C
Corresponding Bid values are in column D
The items are not sorted in any particular order.
Problem
Given the above, find the start, end max & min prices for a particular bid item.

see the simulation below:
Book4
BCDEFGHIJ
1BidItemBidTimeBidPriceItemStartLowHighEnd
2FIXT08:5021FIXT215415
3FIXT08:5510FIXB885628
4FIXT09:0041
5FIXT09:0531
6FIXT09:1026
7FIXT09:155
8FIXB09:208
9FIXB09:2535
10FIXB09:3018
11FIXB09:3520
12FIXB09:4056
13FIXB09:4518
14FIXB09:5038
15FIXB09:5546
16FIXB10:0031
17FIXB10:0528
18
Sheet1

This message was edited by PaddyD on 2002-08-26 20:23
 
Upvote 0
explanation:

1) Start times:

Need to use all three columns:

=INDEX($D$2:$D$17,MATCH(F2,IF($C$2:$C$17=MIN(IF($B$2:$B$17=F2,$C$2:$C$17)),$B$2:$B$17)),0)

First, use a min to get the min time for a particular bid for an item:
MIN(IF($B$2:$B$17=F2,$C$2:$C$17))
then plug the value into a standard index / match combination.

2) Min bid

only 2 columns here:

=MIN(IF($B$2:$B$17=F2,$D$2:$D$17))

again, a fairly standard array entered min to find the minumin value of one set of numbers that equal a certain condition.


3) max bid:

as above, but with a max:

=MAX(IF($B$2:$B$17=F2,$D$2:$D$17))

4) End price:

=INDEX($D$2:$D$17,MATCH(F2,IF($C$2:$C$17=MAX(IF($B$2:$B$17=F2,$C$2:$C$17)),$B$2:$B$17)),0)

again, just like the first formula but with min swapped for max to get the end time.

Post back if you need.

Paddy



EDIT:

Note:
1) All the formulas must be array entered.
2) There is no longer any need to sort the data.
This message was edited by PaddyD on 2002-08-26 20:28
 
Upvote 0
Sorry for not making it clear the first time, I want a worksheet to deal with one bid item separately, and each bid item has time seconds intervals from 08:45 to 13:45, and i want to rearrange it into 5 min intervals, and each 5 min intervals there is open, high, low, and close price.
 
Upvote 0
previously i thought with any format in the item column or time column, i can use the Vlookup function, but it's not possible for time format, i just thought that i could copy the formula yu provided for the item format to the time format, sorry !
 
Upvote 0
It is a shame it took you four pages of posts to get round to asking your question. (Or that it took me 4 pages to work out what it was :)

Anyway, I see what you mean re the formatting:
Book4
BCDEFGHIJ
1BidTextTimeBidTimeBidPriceTimeStartLowHighEnd
20842500008:451808:4518183838
30844100008:453808:50#N/A105656
40845150008:502108:552654118
50845160008:501009:0020202020
60845200008:5031
70845300008:5046
80848100008:5056
90851310008:5526
100852000008:555
110853100008:558
120853150008:5541
130854250008:5535
140855000008:5518
150856000009:0020
16
Sheet1



It can be tricky as G3 indicates. However, it should be fixable (there are no other errors, after all). If you can't fix it, you could consider changing the time values to text as a way round any precision issues...

Paddy

One suggest
This message was edited by PaddyD on 2002-08-26 21:13
 
Upvote 0

Forum statistics

Threads
1,214,524
Messages
6,120,049
Members
448,940
Latest member
mdusw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top