Average cells that have numerical values while skipping those that do not

SaltedSeaSlug

New Member
Joined
May 9, 2019
Messages
1
Hello all,

I am very new to VBA and macros and have a question regarding how to obtain an average of certain cells while skipping those which do not contain values. I will explain what I am dealing with more closely.

The worksheet in question was already made and I am tasked with updating it. Currently, there are 3 tables that are 13 columns wide and have 54 rows that allow users to enter data. However, every other cell is blocked out with "---" to restrict users from entering data from that cell. On top of that, the tables are conditionally formatted based on a selection made by the user. The table layout changes based on this selection. For instance, one choice will create a table that is 7 cells x 12 cells. Another may be 6 x 8. Vlookup is used in conjunction with another macro to hide rows and columns that are not applicable.

The goal is to find the average of the same cell location of each of the 3 tables and place this calculation in a 4th table. I would just use the average function in Excel, however the cell is already populated with the vlookup formula to format the table. I am open to any suggestions and any help would be greatly appreciated
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

Forum statistics

Threads
1,215,375
Messages
6,124,591
Members
449,174
Latest member
chandan4057

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