Help with VBA Code

T_Miller

New Member
Joined
Jan 23, 2023
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hello,

I'm trying to automate the summation of some data using VBA but I can't get the final piece to work... I'm trying to calculate SLA success rate for incidents by priority and by business owner. The spreadsheet has the following pertinent fields:

Col. A - Incident number (not needed other than maybe to use for counting purposes)
Col. B - Incident Priority (in the form of "1 - Critical", "2 = Medium", "3 - Moderate", "4 - Low")
Col. H - Business owner name
Col. G - text values of "TRUE" or "FALSE" (has SLA breached? - if "False", then the SLA was met successfully)

I'm trying to output on a separate worksheet:

Col. A - Business Owner
Col. B - Priority
Col. C - Count (count of incidents for each priority for that business owner)
Col. D - SLA Success Rate (Based on business owner and priority, count of INCs with "FALSE" for (SLA Breached) / total count of incidents for that priority and business owner


I've been able to get correct values for Cols A-C on the results sheet, but I cannot figure out how to loop through and get the correct percentage for SLA successful in Col D.

I can provide the VBA code I have so far if that helps. I'm a first-time poster so I wasn't sure how long I should make the post, or the best way to provide that info.

Thanks for any help the community can provide.
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Hi *T_Miller and Welcome to the Board! You have provided a good overview of your needs. Posting your code and perhaps a screen shot of your data sheet would be of assistance. Also, being as specific as possible usually helps for those of us that can't see your wb. For example, what are the sheet names involved? What rows are used (is there a header row)? Does each incident have it's own row? How do you want your output... re-newed each time? appended to previous output? It seem like your specific need is to identify unique businesses then loop your data and get the info that you need for each business. I don't understand.. "Col. C - Count (count of incidents for each priority for that business owner)" ? So your output data is not on 1 row for each business (there are 4 types of incidents)? HTH. Dave
 
Upvote 0

Forum statistics

Threads
1,214,798
Messages
6,121,635
Members
449,043
Latest member
farhansadik

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top