Results 1 to 6 of 6

Multiple categories, Looping iterations and deleting rows

Threaded View

  1. #1
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Multiple categories, Looping iterations and deleting rows

    I have a long dataset, see example in the attached sheet.

    For each category in Column A, I want to be able to calculate a separate robust mean, which I then need to process further. There are lots of ways of doing this. I want to use the following procedure:

    For each category in Column A, calculate the mean & SD.

    If any of the original individual values is >Mean + 1.5 SD – replace the original value with the value of Mean + 1.5 SD. If any of the original individual values is less than M-1.5 SD, replace the original individual value with Mean -1.5 SD.

    Repeat the process (calculating a new Mean and SD) 25 times. By that stage, the mean is a pretty good estimate of the robust mean.

    Then calculate an Index Score for each Value in the ORIGINAL DATA SET to show how far it is from the Robust Mean using the formula (Value – Robust mean)/66.

    If the absolute value of the Index Score exceeds 3.0, delete the entire row.

    Move on to the next category, until all of the categories in Column A have been so processed.

    Stop.

    The eagle-eyed among you may recognise the general form of the data, as I’ve posted other problems related to the same dataset previously!!
    I can do most of the above in Excel outside of VBA, but it’s very clunky. A nice VBA solution would be good to have, but, sadly, I’m not even up to the standard of Chapter 1 of "VBA Programming for Dummies".

    Thanks for looking...
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

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