In Column A I have a list of codes which start with 'SECU'. Then in Column B, I have various information which I only want to check if Column A says SECU0003 (not, for example, SECU0006). So, I want Excel to check Column A and if the cell in that column says SECU0003, I then want Excel to check Column B and count how many cells contain the letter "P" (and no other letters either side of it). Once I have that figure, I want to divide that figure by the sum of all the SECU0003 cells which have any of 5 letters (including 'P'), and then multiply by 100 to get a percentage showing what percentage of all the cells show 'P'. I've had a go with the formula below but in the second COUNTIF formula, I know I can't add the letters with '+' in that part of the formula, but I don't know how to do it. I'm also not sure if I've written the formula in a way that will prevent blank cells from affecting the result.
=(COUNTIFS(C5:C85,"SECU0003",E5:E85,"P")/(COUNTIFS(C5:C85,"SECU0003",E5:E85,"P"+"L"+"D"+"E"+"A")))*100
Please help, I've been going around in circles for hours
=(COUNTIFS(C5:C85,"SECU0003",E5:E85,"P")/(COUNTIFS(C5:C85,"SECU0003",E5:E85,"P"+"L"+"D"+"E"+"A")))*100
Please help, I've been going around in circles for hours