I would like to calculate the mean intensity for those rows which have equivalent h,k,l. By equivalent I mean h=+/- h and k==/-k and l=+/- l . These three conditions need to be satisfied, then these rows are equivalent and I need to get the mean of their corresponding intensities in new column. For example the first 2 shaded rows are equivalent, so calculate average= (31.26 + 42.19)/2 and type it in a new column next to each.