Results 1 to 10 of 10

VBA to clean and audit data

Threaded View

  1. #1
    Registered User
    Join Date
    09-20-2012
    Location
    london, England
    MS-Off Ver
    Excel 2010
    Posts
    7

    Smile VBA to clean and audit data

    Hi,

    I have attached a spreadsheet which i normally use to clean and audit some price data. The steps are as follows:

    1) download data (date, open, high, low, close) into excel. each worksheet corresponds to a different security

    2) Phase 1 clean - takes out all data that is rendered "#N/A N/A" and replaces it with the best previous usable data value

    3) Using a simple Z-score test looking backwards and forwards to get rid of any bad data points (e.g. 40,42,43,75,42 --> would lead to taking out 75 and replacing with 43; same would occur with small numbers like 15,16,15.5,2,15.8,15.9 ---> would lead to 2 be replaced by 15.5

    4) final cleaned data is re-constructed with date.

    These elements are placed are viewable on attached excel sheet.

    I would like assistance in creating a loop which will do all of the above on each worksheet tab (ws) from 0 to N.

    I am having troubles creating the loop - so any direction or assistance would be greatly appreciated.

    Many thanks!!
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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