Just a formula

shadow12345

Well-known Member
Joined
May 10, 2004
Messages
1,238
Hi,

I have the below data and what im trying to get to is the average price for that month.
Just one value for each Month. (I cant make the months come up the table :-( )


<table border = "1" cellspacing = "0" bordercolor="#999999">
<tr><td bgcolor="#C0C0C0"> </td>
<td align="center" bgcolor="#C0C0C0"><b>F</b></td><td align="center" bgcolor="#C0C0C0"><b>G</b></td><td align="center" bgcolor="#C0C0C0"><b>H</b></td></tr>
<tr><td align = "center" bgcolor="#C0C0C0"><b>1</b></td><td rowspan="1" colspan="1" width="225" height="30" align = "left" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">Contract </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "left" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">Price </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "left" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">Volume </font></td></tr>
<tr><td align = "center" bgcolor="#C0C0C0"><b>2</b></td><td rowspan="1" colspan="1" width="225" height="30" align = "left" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">40725 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">2492 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">50 </font></td></tr>
<tr><td align = "center" bgcolor="#C0C0C0"><b>3</b></td><td rowspan="1" colspan="1" width="225" height="30" align = "left" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">40787 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">2525 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">50 </font></td></tr>
<tr><td align = "center" bgcolor="#C0C0C0"><b>4</b></td><td rowspan="1" colspan="1" width="225" height="30" align = "left" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">40725 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">2491 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">3 </font></td></tr>
<tr><td align = "center" bgcolor="#C0C0C0"><b>5</b></td><td rowspan="1" colspan="1" width="225" height="30" align = "left" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">40725 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">2490 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">7 </font></td></tr>
<tr><td align = "center" bgcolor="#C0C0C0"><b>6</b></td><td rowspan="1" colspan="1" width="225" height="30" align = "left" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">40787 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">2523 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">200 </font></td></tr>
<tr><td align = "center" bgcolor="#C0C0C0"><b>7</b></td><td rowspan="1" colspan="1" width="225" height="30" align = "left" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">40725 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">2490 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">1 </font></td></tr>
<tr><td align = "center" bgcolor="#C0C0C0"><b>8</b></td><td rowspan="1" colspan="1" width="225" height="30" align = "left" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">40848 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">2544 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">250 </font></td></tr>
<tr><td align = "center" bgcolor="#C0C0C0"><b>9</b></td><td rowspan="1" colspan="1" width="225" height="30" align = "left" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">40664 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">2479 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">20 </font></td></tr>
<tr><td align = "center" bgcolor="#C0C0C0"><b>10</b></td><td rowspan="1" colspan="1" width="225" height="30" align = "left" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">40725 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">2490 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">6 </font></td></tr>
<tr><td align = "center" bgcolor="#C0C0C0"><b>11</b></td><td rowspan="1" colspan="1" width="225" height="30" align = "left" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">40725 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">2490 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">1 </font></td></tr>
<tr><td align = "center" bgcolor="#C0C0C0"><b>12</b></td><td rowspan="1" colspan="1" width="225" height="30" align = "left" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">40725 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">2490 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">2 </font></td></tr>
<tr><td align = "center" bgcolor="#C0C0C0"><b>13</b></td><td rowspan="1" colspan="1" width="225" height="30" align = "left" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">40725 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">2490 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">12 </font></td></tr>
<tr><td align = "center" bgcolor="#C0C0C0"><b>14</b></td><td rowspan="1" colspan="1" width="225" height="30" align = "left" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">40725 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">2489 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">200 </font></td></tr>
<tr><td align = "center" bgcolor="#C0C0C0"><b>15</b></td><td rowspan="1" colspan="1" width="225" height="30" align = "left" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">40725 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">2489 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">100 </font></td></tr>
<tr><td align = "center" bgcolor="#C0C0C0"><b>16</b></td><td rowspan="1" colspan="1" width="225" height="30" align = "left" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">40787 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">2523 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">100 </font></td></tr>
<tr><td align = "center" bgcolor="#C0C0C0"><b>17</b></td><td rowspan="1" colspan="1" width="225" height="30" align = "left" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">40725 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">2489 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">94 </font></td></tr>
<tr><td align = "center" bgcolor="#C0C0C0"><b>18</b></td><td rowspan="1" colspan="1" width="225" height="30" align = "left" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">40787 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">2523 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">94 </font></td></tr>
<tr><td align = "center" bgcolor="#C0C0C0"><b>19</b></td><td rowspan="1" colspan="1" width="225" height="30" align = "left" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">40725 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">2489 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">50 </font></td></tr>
<tr><td align = "center" bgcolor="#C0C0C0"><b>20</b></td><td rowspan="1" colspan="1" width="225" height="30" align = "left" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">40787 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">2523 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">50 </font></td></tr>
<tr><td align = "center" bgcolor="#C0C0C0"><b>21</b></td><td rowspan="1" colspan="1" width="225" height="30" align = "left" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">40725 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">2489 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">17 </font></td></tr>
</table>
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Which column holds the date of each contract?
And do presumably you want the weighted average price?
 
Upvote 0
may be one of these
Excel Workbook
ABC
1ContractPriceVolume
2Jul-11249250
3Sep-11252550
4Jul-1124913
5Jul-1124907
6Sep-112523200
7Jul-1124901
8Nov-112544250
9May-11247920
10Jul-1124906
11Jul-1124901
12
13
14
15Jul-112490.52491.5
Sheet1
Excel 2003
Cell Formulas
RangeFormula
C15=SUMPRODUCT(--(A2:A11=A15),B2:B11,C2:C11)/SUMPRODUCT(--(A2:A11=A15),C2:C11)
#VALUE!
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
 
Upvote 0
Yes i do want to make it a weighted average... does sumproduct do that? I don't know how to use that one.
 
Upvote 0

Forum statistics

Threads
1,224,609
Messages
6,179,879
Members
452,948
Latest member
Dupuhini

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