weekly data from raw daily data set using vba--help pls

new_vba_student

New Member
Joined
Mar 13, 2011
Messages
1
hello I have a raw daily data set for many stocks from 2001-2011..what I need to do is I that I need the price of each stock for every wednesday from march 2009 to march 2011...
How do I get the stock price of every stock on wednesdays (2009-2011) using vba. and display the data in the form :dates in column A, Stock 1 price in column B, stock 2 price in Colum C and so on..
 

Some videos you may like

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

venkat1926

Well-known Member
Joined
Aug 21, 2005
Messages
4,824
suppose sample data is like this

date stock1 stock2 stock3 stock4
1/1/2009 60 24 71 69
1/2/2009 26 98 31 75
1/3/2009 55 65 6 72
1/4/2009 61 14 35 57
1/5/2009 78 17 94 43
1/6/2009 97 84 34 92
1/7/2009 63 15 99 7
1/8/2009 67 14 65 62
1/9/2009 11 5 15 60
1/10/2009 4 1 70 39
1/11/2009 71 26 91 78
1/12/2009 79 2 20 33
1/13/2009 91 83 12 15
1/14/2009 26 45 32 82
1/15/2009 5 39 77 63
1/16/2009 96 78 40 19
1/17/2009 61 38 40 85
1/18/2009 89 78 70 81
1/19/2009 15 6 22 57
1/20/2009 87 27 88 93
1/21/2009 9 51 67 100
1/22/2009 6 35 53 72
1/23/2009 81 92 24 8
1/24/2009 47 94 64 15
1/25/2009 54 89 20 65
1/26/2009 23 84 88 1
1/27/2009 21 43 52 61
1/28/2009 83 75 75 38
1/29/2009 49 21 91 60

InF2 type a formula
=weeday(a2)
copy F2 down
highlight whole data includng col F
autofiler according to column F to value 4(4 is Wednesday)
copy filtered data to a new sheet or location.
remove autofilter
 

Watch MrExcel Video

Forum statistics

Threads
1,123,398
Messages
5,601,440
Members
414,450
Latest member
Cassy_sn

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
Top