Consulting

Results 1 to 3 of 3

Thread: calculate data and find outliers

  1. #1
    VBAX Newbie
    Joined
    Aug 2012
    Posts
    3
    Location

    calculate data and find outliers

    Dear all,

    I am writing to request a macro/function/formula, which can find duplicate names and match them up, between both sheets and run logic calculations, as explained below:

    The aim of the macro is to find the same name and date from (sheet2) and match it to the , same name and date in sheet1, and execute the calculation logic below:

    outlier calculation logic:
    if name's prices (sheet1 - column G) fall under the high & low Range (from sheet2 - range 1), then leave blank, else if they do not, highlight the prices in sheet1, in red.

    if name's prices (sheet1 - column G) fall under the high & low Range (from sheet2 - range 2), then leave blank, else if they do not, highlight the prices in sheet1, in yellow.

    Also, if any outliers found extract them in to the sheet2, under the heading outliers. please note, outliers can be more than

    Please see the attachment below, for further details:
    outliers.xls

    the example can be seen in the sheet1, which is the desired output.

    Thank you for your time and help.

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    A workbook with a few manually calculated results would help.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,876
    The attached is a version of your sheet with conditional formatting in column H (for the moment, only to compare with your highlighting).
    The red highlighted area (L1:U14) is not needed (can be deleted) but just shows the derivation of the formulae used in the conditional formatting; the formulae used are in cells T2 and U2, which are in turn derived from the formulae in M2 and Q2 respectively.
    I've made the assumption that your "fall under" means "fall within".

    Note: While saving and attaching the sheet I tried to save as an .xls file but I've used conditional formatting formulae which use data from a different sheet from the one which has the conditional formatting, and that wasn't allowed until after Excel 2007 or Excel 2010, so I hope you're using an Excel version where this is allowed.
    Attached Files Attached Files
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •