VBA UDF required

  • [xpost][/xpost]

    Hi Guys,

    Can someone help make a UDF code that will do the following:

    Note: Only VBA code to be used and no reference to any Excel functions required such as Application.Worksheet Functions. Any built-in VBA functions can be used such as sqr.

    1. Base Data: Have 3 columns of indefinite length. Column1: Company Name, Column2: Rating, Column3: Coupon

    2. Input will be two ranges of data i.e. Rating and Coupon.

    3. It should be callable from within Excel (i.e. from a cell of worksheet).

    4. Output requirements:

    i) Code should identify all unique Credit Ratings and display them.

    ii) The count of each Credit Rating should be displayed in the cell to the right of it the rating.

    iii) The average value of the coupons against each credit rating should be displayed in the cell to the right.

    iv) The population standard deviation of the coupons of that credit rating should be displayed in the cell to the right.

    I am attaching the sample data file for reference as well.

  • Links to all forums where I have posted this query:

    1. VBA UDF required

    2. https://www.excelforum.com/edi…php?p=5460054&do=editpost

    3. http://www.vbaexpress.com/foru…uired&p=406676#post406676

    4. https://www.mrexcel.com/board/…vba-udf-required.1159405/

    Yes, reinventing the wheel is my requirement unfortunately and I don't even know how to make the wheel spin ^^

    Was hoping to get some assistance here, whatever falls within the forum rules/mandate.

  • Same as the other forums where you have asked. As you have admitted that this is homework, we cannot hand you answers on a plate. We can help you with details if you get unstuck, but the momentum and donkey work has to be from you, because the homework is asking YOU to write code. You cannot submit a solution you don't understand because you did not write it yourself.

    Ali :)

    Enthusiastic self-taught user of MS Excel who's always learning!
    If anyone has helped you towards solving a problem, then you can thank them by clicking on the like icon bottom right.

    :!:Forum Rules

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!