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"))
[TABLE="width: 384"]
<tbody>[TR]
[TD]Date
[/TD]
[TD]Cars
[/TD]
[TD]Month
[/TD]
[TD]Avg Cars per month
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1/4/11
[/TD]
[TD]50
[/TD]
[TD]1/1/2011
[/TD]
[TD]50
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2/1/11
[/TD]
[TD]60
[/TD]
[TD]2/1/2011
[/TD]
[TD]60
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3/1/11
[/TD]
[TD]60
[/TD]
[TD]3/1/2011
[/TD]
[TD]60
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3/25/11
[/TD]
[TD]42
[/TD]
[TD]3/1/2011
[/TD]
[TD]42
[/TD]
[TD]<- error, should be 51
[/TD]
[/TR]
[TR]
[TD]4/5/11
[/TD]
[TD]67
[/TD]
[TD]4/1/2011
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4/25/11
[/TD]
[TD]69
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5/18/11
[/TD]
[TD]63
[/TD]
[TD]5/1/2011
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5/20/11
[/TD]
[TD]64
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6/6/11
[/TD]
[TD]66
[/TD]
[TD]6/1/2011
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7/10/11
[/TD]
[TD]76
[/TD]
[TD]7/1/2011
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7/18/11
[/TD]
[TD]51
[/TD]
[TD][/TD]
[TD][/TD]
[TD]
[/TD]
[/TR]
</tbody>[/TABLE]
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"))
[TABLE="width: 384"]
<tbody>[TR]
[TD]Date
[/TD]
[TD]Cars
[/TD]
[TD]Month
[/TD]
[TD]Avg Cars per month
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1/4/11
[/TD]
[TD]50
[/TD]
[TD]1/1/2011
[/TD]
[TD]50
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2/1/11
[/TD]
[TD]60
[/TD]
[TD]2/1/2011
[/TD]
[TD]60
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3/1/11
[/TD]
[TD]60
[/TD]
[TD]3/1/2011
[/TD]
[TD]60
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3/25/11
[/TD]
[TD]42
[/TD]
[TD]3/1/2011
[/TD]
[TD]42
[/TD]
[TD]<- error, should be 51
[/TD]
[/TR]
[TR]
[TD]4/5/11
[/TD]
[TD]67
[/TD]
[TD]4/1/2011
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4/25/11
[/TD]
[TD]69
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5/18/11
[/TD]
[TD]63
[/TD]
[TD]5/1/2011
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5/20/11
[/TD]
[TD]64
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6/6/11
[/TD]
[TD]66
[/TD]
[TD]6/1/2011
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7/10/11
[/TD]
[TD]76
[/TD]
[TD]7/1/2011
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7/18/11
[/TD]
[TD]51
[/TD]
[TD][/TD]
[TD][/TD]
[TD]
[/TD]
[/TR]
</tbody>[/TABLE]