|When you call your mechanic do you tell him "My car's not working" or do you tell him what it is/isn't doing? Since we can't see your workbook from where we're sitting, it would help if you told us what "it is not working" means. Is it throwing out errors? Is it not returning the results you wanted? Is it crashing your computer? etc.|
I notice that the quotes around ”AH“ don't look right. If the code is throwing out an error, you might want to delete those quotes in the VBA editor and retype those quotes.
As far as where you want to put the code, that would all depend on when you want that particular section of code to run. I notice that the original code is placing the result for the current "Round" in P155 , yet you say the result for this new piece of code should also be placed in P155.
That's a little confusing to me, but the answer to "I'm not sure where to place it within the existing code" will depend on which answer you want in P155 after the code is run: The result based on the values in Range("AI2:AI151") or the result based the values in Range("AH2:AH151")...or both.
BTW...Have I suggested this tutorial before?
You really should review it if you haven't already. It might save you some time by helping you debug/write your own code. We don't mind helping, but sometimes we are not available when you need us. The more you are able to learn on your own, the better you'll be at helping yourself. I learned a lot about writing VBA code by using the techniques described in that tutorial to help me understand how code written by others was working. The Single Stepping technique and the Watch window are extremely powerful. It is amazed what you can learn when you can watch VBA Code run one step at a time and watch what each variable is being set to at each step.
Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.