+ Reply to Thread
Results 1 to 7 of 7

Seeking Tutor for Replicating Unique Value, COUNTIF, AVERAGEIF and STDEVIF in VBA

  1. #1
    Registered User
    Join Date
    01-23-2021
    Location
    Asia
    MS-Off Ver
    2016
    Posts
    3

    Seeking Tutor for Replicating Unique Value, COUNTIF, AVERAGEIF and STDEVIF in VBA

    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.
    Attached Files Attached Files
    Last edited by VBA Novice123; 01-24-2021 at 08:52 AM. Reason: To comply with forum rules.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,917

    Re: VBA UDF required

    1. This sounds very much like a homework assignment?

    2. Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however the thread title does not really convey what your request is about. Tell us what you are trying to do, not how you think it should be done.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,419

    Re: VBA UDF required for Unique Value, COUNTIF, AVERAGEIF and STDEVIF

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not provided the required cross-post link(s) here.

    Please see Forum Rule #3 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important.

    (Note: this requirement is not optional. As you are new here, I will provide the link for you this time: https://www.ozgrid.com/forum/index.p...-udf-required/.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  4. #4
    Registered User
    Join Date
    01-23-2021
    Location
    Asia
    MS-Off Ver
    2016
    Posts
    3

    Re: VBA UDF required for Unique Value, COUNTIF, AVERAGEIF and STDEVIF

    Thanks for pointing out the issues. I have amended the thread title and am posting the links to all my posts below since I am unable to post them in the original post:

    1. ozgrid.com/forum/index.php?thread/1228922-vba-udf-required/
    2. excelforum.com/editpost.php?p=5460054&do=editpost
    3. vbaexpress.com/forum/showthread.php?68319-VBA-UDF-required&p=406676#post406676
    4. mrexcel.com/board/threads/vba-udf-required.1159405/

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,419

    Re: Replicating Unique Value, COUNTIF, AVERAGEIF and STDEVIF in VBA without referencing Ex

    Wow! You clearly failed to read the rules on any of those fora before posting, despite agreeing to them upon joining. Tut, tut.

    Here are ours (please read them): https://www.excelforum.com/forum-rul...rum-rules.html

    Please be aware that prolific cross-posters, especially those who effectively spam multiple fora with their query straight off in this way, often fail to get the help they need on any of the fora. It is not an MO that I would recommend you repeat.

    Now, please answer the question: is this homework?

  6. #6
    Registered User
    Join Date
    01-23-2021
    Location
    Asia
    MS-Off Ver
    2016
    Posts
    3

    Re: Replicating Unique Value, COUNTIF, AVERAGEIF and STDEVIF in VBA without referencing Ex

    I shall remain mindful of spamming. Thanks for the tip.

    Yes, this is homework and I have no experience with coding of any sort at all so looking for all the help I can get. I am already grateful that such active forums are present.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,419

    Re: Replicating Unique Value, COUNTIF, AVERAGEIF and STDEVIF in VBA without referencing Ex

    Right. In that case, read this to understand why we are not going to help you until you start working on this yourself:

    Nothing is more frustrating than to be working on homework and to get stuck. Without guidance, you might have no hope of finishing the assignment before the deadline. The Internet can be a big help in that respect, but without learning how to get the right answer, asking others to solve your homework questions for you simply becomes a downward spiral (and it's cheating).

    We do not want to contribute to you cheating yourself out of your education, but we also acknowledge that seeking assistance to learn a concept is a legitimate request.

    If you are genuinely interested in receiving help in the form of tutoring or coaching, then please rephrase the title of your original post to clearly indicate you are seeking coaching or tutoring help. Any forum members (who are willing to assist as a tutor) will modify their responses accordingly to facilitate your learning. Tutors don't tell you the answers, they help you figure it out for yourself; so don't expect answers, expect suggestions, or just plain hints. Also, be specific in describing the function/formula or technique you trying to learn, and tell us what you have attempted so far. Otherwise, expect your plea for homework answers to be ignored.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] VBA Required to compare 4 set of datas & pick the required data
    By amb2301 in forum Excel Programming / VBA / Macros
    Replies: 35
    Last Post: 10-11-2020, 05:44 AM
  2. Formula Required to add on Numbers as required to other data
    By choccy_77 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-01-2020, 01:16 PM
  3. Replies: 3
    Last Post: 07-15-2016, 12:39 PM
  4. [SOLVED] Simple Conditional Formating Help Required - If Blank then Red Bold text required
    By thilag in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-19-2014, 12:23 PM
  5. Help required in matching data in required format
    By pravindwd in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-04-2013, 09:03 PM
  6. Help required in matching data in required format
    By pravindwd in forum Access Tables & Databases
    Replies: 1
    Last Post: 05-04-2013, 04:11 PM

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