Hi I'm new to the vba coding inside excel and I have a program I need to make. The program needs to take input data of varying sizes and calculate averages and ranges for each set, then calculate the averages of these averages and ranges as Xbar and Rbar. My difficulty is that when I try to set this up it finds the first averages without trouble but then doesnt find the Xbar or Rbar if the data is under the max. Any guidance or help would be great. Thank you