coldsteel2177
New Member
- Joined
- Aug 14, 2018
- Messages
- 1
I am working a a data entry user form that needs to calculate the Days shift Data and the night shift data to create an average. I have 20 averages that needs to be calculated and i have a button set up to execute the averaging function.
Currently the code i am using for the averaging is as follows:
Me.TextBox68.Value = WorksheetFunction.Average(Me.TextBox4.Value, Me.TextBox5.Value)
This works just fine if there is data on both shifts. the issue i am having is that some days there is no data for a certain shift which means one of the two text-boxes being averaged is blank which causes an error. How do i get this to ignore blank boxes.
Any help would be greatly appreciated.
Currently the code i am using for the averaging is as follows:
Me.TextBox68.Value = WorksheetFunction.Average(Me.TextBox4.Value, Me.TextBox5.Value)
This works just fine if there is data on both shifts. the issue i am having is that some days there is no data for a certain shift which means one of the two text-boxes being averaged is blank which causes an error. How do i get this to ignore blank boxes.
Any help would be greatly appreciated.