How to pull values using dates?

TurkeyFeast

New Member
Joined
Aug 15, 2017
Messages
4
I have data values for given dates and I want to create a formula that will pull the value from column B based on the date in Column A. However, I would like to have the inconsistently formatted data in Column A be organized by month. Is this possible?

the formula I am using for "avg cars per month" is: =IF(MONTH(A4)&MONTH(A5)=MONTH(C4),AVERAGE(B4:B5),IF(MONTH(A4)=MONTH(C4),B4,"false"))



Date
Cars
Month
Avg Cars per month
1/4/11
50
1/1/2011
50
2/1/11
60
2/1/2011
60
3/1/11
60
3/1/2011
60
3/25/11
42
3/1/2011
42
<- error, should be 51
4/5/11
67
4/1/2011
4/25/11
69
5/18/11
63
5/1/2011
5/20/11
64
6/6/11
66
6/1/2011
7/10/11
76
7/1/2011
7/18/11
51






<tbody>
</tbody>
 
It seems the formula above uses the entire range..Not exactly what i've suggested, but you said it's working fine...

M.
 
Upvote 0

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

Forum statistics

Threads
1,216,146
Messages
6,129,142
Members
449,488
Latest member
qh017

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