Row reference and applying to another column.

Pedro's PhD

Board Regular
Joined
Jun 3, 2011
Messages
63
Hi everyone, <o:p></o:p>
<o:p> </o:p>
I'm looking for a function that will find a value somewhere in a column and then return the row reference. From two row references obtained, i then need to use them as my data range to calculate average values for a different column.<o:p></o:p>
<o:p> </o:p>
For example: <o:p></o:p>
Cell ‘A10’ the value is ‘1’ <o:p></o:p>
Cell ‘A11’ the value is ‘2’, <o:p></o:p>
Cell ‘A12’ the value is ‘3’ <o:p></o:p>
Cell ‘A13’ the value is ‘4’ .... and so forth for 1000 rows. <o:p></o:p>
<o:p> </o:p>
I then enter in cell ‘B1’ the value ‘2’ and in cell ‘B2’ the value ’4’. I now need a formula to calculate the average of values in column C between “C11:C13”. This range was determined as the input in 'B1' corresponds to row reference in ColumnA. So ‘B1’ had the value of ‘2’, and the value ‘2’ in column A was in Row11. Likewise, cell 'B2' had the value '4', and value '4' appears in Row13 in ColumnA.<o:p></o:p>
<o:p> </o:p>
Hope that makes sense,<o:p></o:p>
<o:p> </o:p>
Many thanks in advance.... Pedro.
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

Forum statistics

Threads
1,215,523
Messages
6,125,318
Members
449,218
Latest member
Excel Master

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top