Average of cells excluding those with specific formatting (Fill)
I have a table of data from which I want to get two averages from each row.
One is the normal average, the other is the average which excludes certain values. Those values to be excluded are designated by colored fill (highlighting). I still want those
values to be visible, but not included in the 2nd average.
My current average formula is "=AVERAGE(D3:Z3)" which is filled down the page.
I cannot work out how to alter that to exclude any highlighted cells.
Can it be done?
Keys to the Problem Average of cells excluding those with specific formatting (Fill)
This UDF will average the non-filled cells provided the fill is not the result of conditional formatting.
ALT+F11 to open VB editor, right click this workbook and insert module and paste the code in on the right, close VB editor.
Back on the worksheet call with.
Function AveragePlain(rng As Range)
Dim c As Range
Dim Tot As Long, Num As Long
For Each c In rng
If c.Interior.ColorIndex = xlNone And c.Value <> "" Then
Num = Num + 1
Tot = Tot + c.Value
AveragePlain = Tot / Num
Using Windows troubleshooter:
- Click on Search on Charm bar and type Troubleshooting. Click on the very first option.
- A new window will open. Click View all from the left pane.
- Scroll down to the bottom and click on Windows update.
- Troubleshooter window for Windows update will pop up. Click on NEXT. It may ask you for administrative permission.
- The troubleshooter will automatically detect problems and fix it.
- Now, close this window and try download/install the app which was previously showing error.
Another Safe way to Fix the Problem: Average of cells excluding those with specific formatting (Fill):
How to Fix Average of cells excluding those with specific formatting (Fill) with SmartPCFixer?
1. Click the button to download Error Fixer . Install it on your system. Open it, and it will perform a scan for your computer. The junk files will be shown in the list.
2. After the scan is finished, you can see the errors and problems need to be repaired. Click Fix All.
3. The Repair part is done, the speed of your computer will be much higher than before and the errors have been fixed. You can also use other functions in this software. Like dll downloading, windows updating and print spooler error repair.
Related: AMD Radeon HD 7800M Win8 not working [Anwsered],I can access the internet, get on facebook and get to hotmail, but I can't play games on facebook and I can't open or respond to my e-mails,I keep getting this Media Player error when I log on my computer. [Anwsered],[Anwsered] System Hanging on shutdown and restart,Unable to get the Vlookup property of the WorksheetFunction class,Solution to Error: Error: "0x81000032 make sure the C: drive is online and set to NTFS" when trying to backup to external hard drive.
,Troubleshoot:External Hard Drive not listed in Windows 7 backup wizard Error
,I'm always being signed off so annoying Tech Support
,Solution to Problem: Impossible to use Internet Explorer! I keep getting the same error message every time i try to use IE.
,Solution to Problem: Referencing data in another file
,Troubleshoot:Error: "0x81000032 make sure the C: drive is online and set to NTFS" when trying to backup to external hard drive. Error,External Hard Drive not listed in Windows 7 backup wizard Tech Support,Tech Support: I'm always being signed off so annoying,Solution to Problem: Impossible to use Internet Explorer! I keep getting the same error message every time i try to use IE.,Referencing data in Access using Excel [Anwsered],Need Best Way To Present Data [Anwsered],Same question but for windows 7 home edition,sometimes fullscreen won't activate [Solved],Solution to Error: We bought a new computer with windows 7 and it is constantly freezing. How do we fix this?,Solution to Error: Windows 8 update crash (2013-07-22)
Read More: Solution to Error: Automatic refresh of data between workbooks,Solution to Problem: back slash appears on search window or data I am typing.,Troubleshooting:Auto-deleting rows with no content in Excel spreadsheets Error,Tech Support: Automatically copies text from one cell in a sheet to the same cell in every other sheet,How to Fix - Auto open Document Properties in Word?,application not found error,any problems in a team where one has Windows XP and the other has Windows 7?,Application/Object-Defined Error,An Excel formula question where hours are totalled and cumulating,Anyone know the hardware email?