View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
[email protected] DonFlak@gmail.com is offline
external usenet poster
 
Posts: 41
Default A formula to AVERAGE IF but only average a set number of values

I have a chart that has a row of data at the top.

One cell, let's say O5 has a value, let's say 5.

I need to search the O column for the value (5).

When it locates the 1st line with a 5 in column O (let's say O18) I
need it to take the value from Column N (N18) and place it in cell N5.

I then need to take the first 4 lines with the value of 5 in Column O
(the previous O18, and let's say O26, O38, and O57) and average the 4
values in column N (N18, N26, N38, & N57) then place the average value
in cell N4.

I want to search the column O beginning with line 8 and below but as I
said I only want the 1st match and the 1st 4 matches.

I can't find a way to do this but as the value in O5 continually
changes, I need to automate this process.

Any assistance is greatly appreciated.

Don