SQUIDD
Well-known Member
- Joined
- Jan 2, 2009
- Messages
- 2,104
- Office Version
- 2019
- 2016
- Platform
- Windows
Hi
So i have a few scattered cells that i need to get the average of them
The below works until one of these figures is a "0", then it messes with my average.
so i wanted to modify this to averageif, but i am not having an sucsess, perhaps i am chasing something that will not work.
and help or pointers would be great.
thanks
dave
So i have a few scattered cells that i need to get the average of them
The below works until one of these figures is a "0", then it messes with my average.
VBA Code:
Set myrng = Union(Cells(2, 2), Cells(4, 2))
my_average = Application.WorksheetFunction.Average(myrng)
so i wanted to modify this to averageif, but i am not having an sucsess, perhaps i am chasing something that will not work.
and help or pointers would be great.
thanks
dave