Excel VBA - Using CountA to total non-blank cells and calculate percentages

Becky24

New Member
Joined
Jul 13, 2020
Messages
6
Office Version
  1. 2016
Platform
  1. Windows
I have a spreadsheet with headers where I am totaling columns E through I and column M and then I want to count the non-blank cells in column A and use that result to add percentages below each of the totaled columns. The number of rows could change from time to time so I need the spreadsheet to find the cells under each of the totals to enter the percentages. I’m doing a number of other things with my spreadsheet, but this part is really causing me a problem. I’ve tried a number of things, without success. I’m new to creating code in VBA and appreciate any assistance.
 
That is perfectly fine. I did realize what you were doing which will work just fine as all the columns I'm totalling and creating percentages for will have something in all the cells(no blank cells). The 0 means they haven't taken a course and the 1 means they have, so I'm totalling the 1's and then dividing by the total participants (row count) to get my percentages. Thank you for above though. I'll study that as it might be useful to me in the future.
You're welcome,
regards, JLG
 
Upvote 0

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Forum statistics

Threads
1,214,923
Messages
6,122,289
Members
449,077
Latest member
Rkmenon

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