Removing weekends and holidays from trading price data set

ghexer

New Member
Joined
Apr 19, 2017
Messages
1
I have the table below - I would like to create a new table that references this table but ignores days with zeros (those are non trading days) So in essence it would look exactly like the table below but 4/14/2017 - 4/16/2017 (for example) would be deleted and the third date would be 4/13/2017. Obviously i want this to be automated so deleting the rows by hand aint gonna cut it. Any ideas??

DateCompany AS&P 500
4/18/201777.3920523.281
4/17/201777.0820636.922
4/16/201700
4/15/201700
4/14/201700
4/13/201775.420453.25
4/12/201777.3120591.86
4/11/201779.1820651.3
4/10/201777.7620658.02
4/9/201700
4/8/201700
4/7/201778.3920656.1
4/6/201777.8720662.95
4/5/201776.4120648.15
4/4/201777.3620689.24
4/3/201777.1920650.21
4/2/201700
4/1/201700
3/31/201778.8120663.22
3/30/201778.2420728.49
3/29/201777.620659.32
3/28/201778.620701.5
3/27/201777.720550.98
3/26/201700
3/25/201700
3/24/201778.3520596.72

<colgroup><col><col><col></colgroup><tbody>
</tbody>
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Welcome to the forum.

Easiest way is to just filter the table. Select one of the columns with the 0s, from the Home tab click Sort & Filter > Filter. Then click the down arrow at the top of the column and uncheck the 0. You can then copy those columns and paste them to another sheet, and you'll only get the visible rows.

Other than that, you could create an array formula that copies over the rows you want to another location. But if there are enough, that will slow down your sheet.

Another option would be to write a macro to perform the function in an "on-demand" manner, but it wouldn't save you much over the filter method.


Hope this helps!
 
Upvote 0

Forum statistics

Threads
1,214,819
Messages
6,121,727
Members
449,049
Latest member
MiguekHeka

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