+ Reply to Thread
Results 1 to 13 of 13

Create average of 3 credit ratings (moody's, S&P, Fitch)

  1. #1
    Registered User
    Join Date
    10-08-2013
    Location
    Pnw, Washington
    MS-Off Ver
    Excel 2010
    Posts
    10

    Angry Create average of 3 credit ratings (moody's, S&P, Fitch)

    Hello! I want to create an average for a list of bonds based on credit ratings. For example, if a bond has a Moody's rating of Aa1, S&P rating of AA, and Fitch rating of AA+, then the average credit rating is AA+ (average expressed in S&P). I want to create a formula of some sort so I do not have to go through hundreds of rows and do it manually. I'm assuming I will also use a VLookup so I can have the correlations between the 3 ratings (like I have below). Or maybe I can assign a numerical value to each row of ratings in the table below, do the average calculation, then convert back to a letter rating?

    Create an average formula for each bond using this example:

    Baa1 A- A




    M. S&P Fitch
    Aaa AAA AAA..................e.x each value in this row here is a 20
    Aa1 AA+ AA+..................19
    Aa2 AA AA....................18
    Aa3 AA- AA-
    A1 A+ A+
    A2 A A
    A3 A- A-
    Baa1 BBB+ BBB+
    Baa2 BBB BBB
    Baa3 BBB- BBB-
    Ba1 BB+ BB+
    Ba2 BB BB
    Ba3 BB- BB-
    B1 B+ B+
    B2 B B
    B3 B- B-
    Caa1 CCC+ CCC
    Caa2 CCC CCC
    Caa3 CCC- CCC
    Ca CC CCC

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: Create average of 3 credit ratings (moody's, S&P, Fitch)

    Perhaps something like the attached.
    Attached Files Attached Files
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    10-08-2013
    Location
    Pnw, Washington
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Create average of 3 credit ratings (moody's, S&P, Fitch)

    Yes that definitely helped! I do have another request though. If one of the ratings is missing (if not all 3 ratings are present for a bond), how do would I alter the formula to take into account the blank? I can't have value be 0 because that would bring the average down. If only 2 ratings are shown and 3rd cell is blank, the average should be out of 2 not 3. If 1 rating is shown, that should be the rating.

    Example:

    Moody's....S&P....Fitch
    A3...........A.......(Blank)

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: Create average of 3 credit ratings (moody's, S&P, Fitch)

    You will have to build a nested if statement to test for empty cells. Here is a link to nested if statements. Give it a whirl and post back if you encounter issues.

    http://www.techonthenet.com/excel/fo.../if_nested.php

  5. #5
    Registered User
    Join Date
    10-08-2013
    Location
    Pnw, Washington
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Create average of 3 credit ratings (moody's, S&P, Fitch)

    If all 3 ratings are present it works. I can delete Moody's but not S&P. I have not accounted for deleting Fitch yet.

    =IF(I4="",IF(H4="",ROUND(AVERAGE(VLOOKUP(H4,$A$2:$D$21,4,FALSE),VLOOKUP(J4,$C$2:$D$21,2,FALSE)),0)),IF(H4="",ROUND(AVERAGE(VLOOKUP(I4,$B$2:$D$21,3,FALSE),VLOOKUP(J4,$C$2:$D$21,2,FALSE)),0),ROUND(AVERAGE(VLOOKUP(H4,$A$2:$D$21,4,FALSE),VLOOKUP(I4,$B$2:$D$21,3,FALSE),VLOOKUP(J4,$C$2:$D$21,2,FALSE)),0)))
    Attached Files Attached Files

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: Create average of 3 credit ratings (moody's, S&P, Fitch)

    IN cell K2, put this revised formula and then copy it down.

    Please Login or Register  to view this content.
    A little bit long, but it works. You had the syntax a little bit messed up.

  7. #7
    Registered User
    Join Date
    10-08-2013
    Location
    Pnw, Washington
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Create average of 3 credit ratings (moody's, S&P, Fitch)

    You had a slight error in the column of the 4th to last VLOOKUP which I fixed (It's a 3 not a 2).

    Please Login or Register  to view this content.
    I can delete any 1 of the 3 credit ratings and it gives the right average. The last step I'm working on now is deleting any 2 of the 3 credit ratings and still getting the right average.

  8. #8
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: Create average of 3 credit ratings (moody's, S&P, Fitch)

    I think the way to do this is to test first for two empty cells and then test of one empty cell. You have the second part in place. To test for two empty cells, you will need to add this type of if statement at the beginning of the current one.
    =IF(AND(H2="",I2=""),VLOOKUP(J2,$B$2:$D$2,2,FALSE),IF(AND(H2="",J2=""),VLOOKUP(I2,$B$2:$D$2,3,FALSE),
    IF(AND(I2="",J2=""),VLOOKUP(H2,$B$2:$D$2,4,FALSE),IF(H2="",ROUND(AVERAGE(VLOOKUP(I2,$B$2:$D$21,3,FALSE),
    VLOOKUP(J2,$C$2:$D$21,2,FALSE)),0),IF(I2="",ROUND(AVERAGE(VLOOKUP(H2,$A$2:$D$21,4,FALSE),
    VLOOKUP(J2,$C$2:$D$21,2,FALSE)),0),IF(J2="",ROUND(AVERAGE(VLOOKUP(H2,$A$2:$D$21,4,FALSE),
    VLOOKUP(I2,$B$2:$D$21,3,FALSE)),0),ROUND(AVERAGE(VLOOKUP(H2,$A$2:$D$21,4,FALSE),
    VLOOKUP(I2,$B$2:$D$21,3,FALSE),VLOOKUP(J2,$C$2:$D$21,2,FALSE)),0)))))))
    This should do it.

    I hope you like this.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    10-08-2013
    Location
    Pnw, Washington
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Create average of 3 credit ratings (moody's, S&P, Fitch)

    Yeah this definitely works better, thanks. Pretty neat and useful formula.

    =IF(AND(H2="",I2=""),VLOOKUP(J2,$B$2:$D$2,2,FALSE),IF(AND(H2="",J2=""),VLOOKUP(I2,$B$2:$D$2,3,FALSE),
    IF(AND(I2="",J2=""),VLOOKUP(H2,$B$2:$D$2,4,FALSE),IF(H2="",ROUND(AVERAGE(VLOOKUP(I2,$B$2:$D$21,3,FALSE),
    VLOOKUP(J2,$C$2:$D$21,2,FALSE)),0),IF(I2="",ROUND(AVERAGE(VLOOKUP(H2,$A$2:$D$21,4,FALSE),
    VLOOKUP(J2,$C$2:$D$21,2,FALSE)),0),IF(J2="",ROUND(AVERAGE(VLOOKUP(H2,$A$2:$D$21,4,FALSE),
    VLOOKUP(I2,$B$2:$D$21,3,FALSE)),0),ROUND(AVERAGE(VLOOKUP(H2,$A$2:$D$21,4,FALSE),
    VLOOKUP(I2,$B$2:$D$21,3,FALSE),VLOOKUP(J2,$C$2:$D$21,2,FALSE)),0)))))))

  10. #10
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: Create average of 3 credit ratings (moody's, S&P, Fitch)

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  11. #11
    Registered User
    Join Date
    10-08-2013
    Location
    Pnw, Washington
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Create average of 3 credit ratings (moody's, S&P, Fitch)

    There was actually an error with the cell referencing in the Vlookups when testing for 2 blanks. I went ahead and fixed it. The final formula should be:

    =IF(AND(H2="",I2=""),VLOOKUP(J2,$C$2:$D$21,2,FALSE),IF(AND(H2="",J2=""),VLOOKUP(I2,$B$2:$D$21,3,FALSE),
    IF(AND(I2="",J2=""),VLOOKUP(H2,$A$2:$D$21,4,FALSE),IF(H2="",ROUND(AVERAGE(VLOOKUP(I2,$B$2:$D$21,3,FALSE),
    VLOOKUP(J2,$C$2:$D$21,2,FALSE)),0),IF(I2="",ROUND(AVERAGE(VLOOKUP(H2,$A$2:$D$21,4,FALSE),
    VLOOKUP(J2,$C$2:$D$21,2,FALSE)),0),IF(J2="",ROUND(AVERAGE(VLOOKUP(H2,$A$2:$D$21,4,FALSE),
    VLOOKUP(I2,$B$2:$D$21,3,FALSE)),0),ROUND(AVERAGE(VLOOKUP(H2,$A$2:$D$21,4,FALSE),
    VLOOKUP(I2,$B$2:$D$21,3,FALSE),VLOOKUP(J2,$C$2:$D$21,2,FALSE)),0)))))))

  12. #12
    Registered User
    Join Date
    10-30-2014
    Location
    New York
    MS-Off Ver
    2010
    Posts
    6

    Re: Create average of 3 credit ratings (moody's, S&P, Fitch)

    Is there a way to use this logic but instead of averaging the 3 credit ratings but to select the lowest of the 3 credit ratings? I am not even sure if my question makes sense at all.

    Also, what if one of the credit ratings have #N/A N/A instead of blank cell?

    Please advise. Thank you.
    Last edited by farriola; 10-31-2014 at 09:33 AM.

  13. #13
    Registered User
    Join Date
    10-08-2013
    Location
    Pnw, Washington
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Create average of 3 credit ratings (moody's, S&P, Fitch)

    LowestCreditRating.xlsx

    The lowest regardless of which ratings are present is attached.

    I set it so if there is an error, you get NR instead.

    =IF(AND(H2="",I2=""),VLOOKUP(J2,$R$2:$S$43,2,FALSE),IF(AND(H2="",J2=""),VLOOKUP(I2,$R$2:$S$43,2,FALSE),
    IF(AND(I2="",J2=""),VLOOKUP(H2,$R$2:$S$43,2,FALSE),IF(H2="",MIN(VLOOKUP(I2,$R$2:$S$43,2,FALSE),
    VLOOKUP(J2,$R$2:$S$43,2,FALSE)),IF(I2="",MIN(VLOOKUP(H2,$R$2:$S$43,2,FALSE),
    VLOOKUP(J2,$R$2:$S$43,2,FALSE)),IF(J2="",MIN(VLOOKUP(H2,$R$2:$S$43,2,FALSE),
    VLOOKUP(I2,$R$2:$S$43,2,FALSE)),MIN(VLOOKUP(H2,$R$2:$S$43,2,FALSE),
    VLOOKUP(I2,$R$2:$S$43,2,FALSE),VLOOKUP(J2,$R$2:$S$43,2,FALSE))))))))

+ 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. Ranking Credit Ratings
    By oseroser in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-10-2012, 09:04 AM
  2. Using Macro to separate credit term and non credit term
    By gingank in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-01-2012, 02:22 AM
  3. Create two line journal entry from one line, two different column for debit & credit
    By ditto135 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-03-2011, 03:01 PM
  4. Average - How to create a running Average
    By Mihir72 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-27-2008, 11:12 AM

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