How to group by month

15minoffame

Board Regular
Joined
Nov 26, 2014
Messages
55
Hi,
Can anyone help me group all Jan, Apr, July, Oct data together? The following data starts in column A.

[TABLE="width: 808"]
<colgroup><col><col span="11"></colgroup><tbody>[TR]
[TD="align: left"]
C:\Users\user\AppData\Local\Temp\msohtmlclip1\01\clip_image002.png
Tue 01/26/2016 AC

<tbody>
</tbody>
[/TD]
[TD]$99.99[/TD]
[TD]$96.04[/TD]
[TD]-3.95%[/TD]
[TD]-6.57%[/TD]
[TD]-2.65%[/TD]
[TD]-2.65%[/TD]
[TD]-3.64%[/TD]
[TD]-4.98%[/TD]
[TD]-3.35%[/TD]
[TD]-3.30%[/TD]
[TD]5.92%[/TD]
[/TR]
[TR]
[TD]Tue 10/27/2015 AC[/TD]
[TD]$114.55[/TD]
[TD]$117.58[/TD]
[TD]2.64%[/TD]
[TD]4.12%[/TD]
[TD]4.32%[/TD]
[TD]4.32%[/TD]
[TD]6.50%[/TD]
[TD]5.25%[/TD]
[TD]-0.75%[/TD]
[TD]3.27%[/TD]
[TD]-6.30%[/TD]
[/TR]
[TR]
[TD]Tue 07/21/2015 AC[/TD]
[TD]$130.75[/TD]
[TD]$121.99[/TD]
[TD]-6.69%[/TD]
[TD]-4.22%[/TD]
[TD]-4.78%[/TD]
[TD]-4.78%[/TD]
[TD]-5.93%[/TD]
[TD]-9.41%[/TD]
[TD]-13.20%[/TD]
[TD]-21.13%[/TD]
[TD]-11.80%[/TD]
[/TR]
[TR]
[TD]Mon 04/27/2015 AC[/TD]
[TD]$132.65[/TD]
[TD]$134.46[/TD]
[TD]1.36%[/TD]
[TD]-1.57%[/TD]
[TD]-5.65%[/TD]
[TD]-2.78%[/TD]
[TD]-5.16%[/TD]
[TD]-3.79%[/TD]
[TD]-1.85%[/TD]
[TD]-1.78%[/TD]
[TD]-4.56%[/TD]
[/TR]
[TR]
[TD]Tue 01/27/2015 AC[/TD]
[TD]$109.14[/TD]
[TD]$117.62[/TD]
[TD]7.76%[/TD]
[TD]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]-2.12%[/TD]
[TD]4.94%[/TD]
[TD]3.61%[/TD]
[/TR]
[TR]
[TD]Tue 07/23/2013 AC[/TD]
[TD]$418.99[/TD]
[TD]$438.93[/TD]
[TD]4.75%[/TD]
[TD]5.13%[/TD]
[TD]5.25%[/TD]
[TD]5.25%[/TD]
[TD]8.00%[/TD]
[TD]12.04%[/TD]
[TD]16.84%[/TD]
[TD]20.04%[/TD]
[TD]7.42%[/TD]
[/TR]
[TR]
[TD]Tue 04/23/2013 AC[/TD]
[TD]$406.13[/TD]
[TD]$393.54[/TD]
[TD]-3.09%[/TD]
[TD]-0.16%[/TD]
[TD]2.72%[/TD]
[TD]2.72%[/TD]
[TD]8.16%[/TD]
[TD]13.43%[/TD]
[TD]9.29%[/TD]
[TD]9.60%[/TD]
[TD]6.36%[/TD]
[/TR]
[TR]
[TD]Wed 01/23/2013 AC[/TD]
[TD]$514.00[/TD]
[TD]$460.00[/TD]
[TD]-10.50%[/TD]
[TD]-12.35%[/TD]
[TD]-14.42%[/TD]
[TD]-12.48%[/TD]
[TD]-11.38%[/TD]
[TD]-10.92%[/TD]
[TD]-9.14%[/TD]
[TD]-12.65%[/TD]
[TD]-11.57%[/TD]
[/TR]
[TR]
[TD]Thu 10/25/2012 AC[/TD]
[TD]$609.54[/TD]
[TD]$609.42[/TD]
[TD]-0.01%[/TD]
[TD]-0.90%[/TD]
[TD]-0.90%[/TD]
[TD]-0.90%[/TD]
[TD]-5.37%[/TD]
[TD]-8.45%[/TD]
[TD]-13.76%[/TD]
[TD]-4.36%[/TD]
[TD]-13.65%[/TD]
[/TR]
[TR]
[TD]Tue 07/24/2012 AC[/TD]
[TD]$600.91[/TD]
[TD]$574.46[/TD]
[TD]-4.40%[/TD]
[TD]-4.31%[/TD]
[TD]-2.62%[/TD]
[TD]-2.62%[/TD]
[TD]0.98%[/TD]
[TD]3.59%[/TD]
[TD]5.12%[/TD]
[TD]12.44%[/TD]
[TD]16.45%[/TD]
[/TR]
[TR]
[TD]Tue 04/24/2012 AC[/TD]
[TD]$560.28[/TD]
[TD]$615.64[/TD]
[TD]9.88%[/TD]
[TD]8.87%[/TD]
[TD]7.62%[/TD]
[TD]7.62%[/TD]
[TD]4.58%[/TD]
[TD]1.64%[/TD]
[TD]-1.26%[/TD]
[TD]0.35%[/TD]
[TD]4.55%[/TD]
[/TR]
[TR]
[TD]Tue 01/24/2012 AC[/TD]
[TD]$420.41[/TD]
[TD]$454.44[/TD]
[TD]8.09%[/TD]
[TD]6.24%[/TD]
[TD]6.39%[/TD]
[TD]6.39%[/TD]
[TD]8.51%[/TD]
[TD]10.36%[/TD]
[TD]21.18%[/TD]
[TD]25.05%[/TD]
[TD]42.97%[/TD]
[/TR]
[TR]
[TD]Tue 10/18/2011 AC[/TD]
[TD]$422.24[/TD]
[TD]$401.35[/TD]
[TD]-4.94%[/TD]
[TD]-5.59%[/TD]
[TD]-6.95%[/TD]
[TD]-6.95%[/TD]
[TD]-5.12%[/TD]
[TD]-4.13%[/TD]
[TD]-3.79%[/TD]
[TD]-12.60%[/TD]
[TD]-7.19%[/TD]
[/TR]
[TR]
[TD]Tue 07/19/2011 AC[/TD]
[TD]$376.85[/TD]
[TD]$396.12[/TD]
[TD]5.11%[/TD]
[TD]2.66%[/TD]
[TD]4.36%[/TD]
[TD]4.36%[/TD]
[TD]4.17%[/TD]
[TD]5.28%[/TD]
[TD]-0.75%[/TD]
[TD]-5.41%[/TD]
[TD]0.81%[/TD]
[/TR]
[TR]
[TD]Wed 04/20/2011 AC[/TD]
[TD]$342.41[/TD]
[TD]$355.00[/TD]
[TD]3.67%[/TD]
[TD]2.42%[/TD]
[TD]2.42%[/TD]
[TD]3.09%[/TD]
[TD]1.26%[/TD]
[TD]1.69%[/TD]
[TD]1.40%[/TD]
[TD]-2.98%[/TD]
[TD]-2.91%[/TD]
[/TR]
[TR]
[TD]Tue 01/18/2011 AC[/TD]
[TD]$340.65[/TD]
[TD]$348.35[/TD]
[TD]2.26%[/TD]
[TD]-0.53%[/TD]
[TD]-4.08%[/TD]
[TD]-4.08%[/TD]
[TD]0.93%[/TD]
[TD]-0.39%[/TD]
[TD]4.27%[/TD]
[TD]2.90%[/TD]
[TD]3.78%[/TD]
[/TR]
[TR]
[TD]Mon 10/18/2010 AC[/TD]
[TD]$318.00[/TD]
[TD]$303.39[/TD]
[TD]-4.59%[/TD]
[TD]-2.67%[/TD]
[TD]-2.66%[/TD]
[TD]-3.31%[/TD]
[TD]-3.12%[/TD]
[TD]-5.35%[/TD]
[TD]0.19%[/TD]
[TD]-3.54%[/TD]
[TD]0.80%[/TD]
[/TR]
[TR]
[TD]Tue 07/20/2010 AC[/TD]
[TD]$251.89[/TD]
[TD]$265.08[/TD]
[TD]5.24%[/TD]
[TD]0.93%[/TD]
[TD]3.19%[/TD]
[TD]3.19%[/TD]
[TD]3.60%[/TD]
[TD]3.95%[/TD]
[TD]2.98%[/TD]
[TD]-2.41%[/TD]
[TD]6.01%[/TD]
[/TR]
[TR]
[TD]Tue 04/20/2010 AC[/TD]
[TD]$244.59[/TD]
[TD]$258.80[/TD]
[TD]5.80%[/TD]
[TD]5.98%[/TD]
[TD]10.72%[/TD]
[TD]10.72%[/TD]
[TD]6.95%[/TD]
[TD]8.89%[/TD]
[TD]4.87%[/TD]
[TD]0.88%[/TD]
[TD]3.96%[/TD]
[/TR]
</tbody>[/TABLE]

Thanks again!
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
What do you mean by "group"? For each date in column A that is Jan, add all of the numbers in the individual columns? Even the percentages?

If the Dates in column A are actual dates, you can easily use a Pivot Table to group by month. It that is what you want to do and you don't know how to use a Pivot Table let me know, that would be easy to do. Alternatively, you can use a SUMIFS function.
 
Upvote 0
What do you mean by "group"? For each date in column A that is Jan, add all of the numbers in the individual columns? Even the percentages?

If the Dates in column A are actual dates, you can easily use a Pivot Table to group by month. It that is what you want to do and you don't know how to use a Pivot Table let me know, that would be easy to do. Alternatively, you can use a SUMIFS function.

I'm sorry, I should've explained it better. I tried the Pivot Table, but it didn't work so obviously, I'm not doing something right. This is what I'm looking for when I mean by grouping. In this example, I want to group all January together and its corresponding percentages. Then I want to do the same for April, July & October. Please disregard the boxes within this grid, not sure why they're there.

[TABLE="class: grid, width: 700"]
<colgroup><col><col span="7"></colgroup><tbody>[TR]
[TD]DATE[/TD]
[TD]Pct[/TD]
[TD]1 DAY[/TD]
[TD]3 DAYS[/TD]
[TD]5 DAYS[/TD]
[TD]8 DAYS[/TD]
[TD]13 DAYS[/TD]
[TD]21 DAYS[/TD]
[/TR]
[TR]
[TD="align: left"]
clip_image002.png
Fri 01/22/2016 BO

<tbody>
</tbody>
[/TD]
[TD="align: left"]
clip_image004.png
-0.13%

<tbody>
</tbody>
[/TD]
[TD]-1.22%[/TD]
[TD]-1.22%[/TD]
[TD]-0.97%[/TD]
[TD]1.78%[/TD]
[TD]0.27%[/TD]
[TD]-3.98%[/TD]
[/TR]
[TR]
[TD]Fri 01/23/2015 BO[/TD]
[TD="align: left"]
clip_image004.png
0.61%

<tbody>
</tbody>
[/TD]
[TD]0.82%[/TD]
[TD]0.82%[/TD]
[TD]0.41%[/TD]
[TD]-1.60%[/TD]
[TD]-0.49%[/TD]
[TD]2.51%[/TD]
[/TR]
[TR]
[TD]Fri 01/17/2014 BO[/TD]
[TD="align: left"]
clip_image004.png
-1.17%

<tbody>
</tbody>
[/TD]
[TD]-2.27%[/TD]
[TD]-2.27%[/TD]
[TD]-3.34%[/TD]
[TD]-8.27%[/TD]
[TD]-7.02%[/TD]
[TD]-8.27%[/TD]
[/TR]
[TR]
[TD]Fri 01/18/2013 BO[/TD]
[TD="align: left"]
clip_image004.png
3.00%

<tbody>
</tbody>
[/TD]
[TD]3.47%[/TD]
[TD]3.45%[/TD]
[TD]3.31%[/TD]
[TD]4.63%[/TD]
[TD]4.35%[/TD]
[TD]5.53%[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Fri 04/17/2015 BO[/TD]
[TD="align: left"]
clip_image004.png
0.43%

<tbody>
</tbody>
[/TD]
[TD]-0.10%[/TD]
[TD]-0.10%[/TD]
[TD]-2.41%[/TD]
[TD]-1.75%[/TD]
[TD]-0.69%[/TD]
[TD]-0.87%[/TD]
[/TR]
[TR]
[TD]Thu 04/17/2014 BO[/TD]
[TD="align: left"]
clip_image004.png
1.33%

<tbody>
</tbody>
[/TD]
[TD]1.68%[/TD]
[TD]1.68%[/TD]
[TD]1.79%[/TD]
[TD]1.30%[/TD]
[TD]2.45%[/TD]
[TD]1.56%[/TD]
[/TR]
[TR]
[TD]Fri 04/19/2013 BO[/TD]
[TD="align: left"]
clip_image004.png
-3.22%

<tbody>
</tbody>
[/TD]
[TD]-4.05%[/TD]
[TD]-4.05%[/TD]
[TD]-5.16%[/TD]
[TD]-2.02%[/TD]
[TD]-2.29%[/TD]
[TD]0.48%[/TD]
[/TR]
[TR]
[TD]Fri 04/20/2012 AC[/TD]
[TD]-1.54%[/TD]
[TD]-1.49%[/TD]
[TD]-1.54%[/TD]
[TD]0.42%[/TD]
[TD]2.13%[/TD]
[TD]1.28%[/TD]
[TD]-1.81%[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Fri 07/17/2015 BO[/TD]
[TD="align: left"]
clip_image004.png
0.81%

<tbody>
</tbody>
[/TD]
[TD]0.73%[/TD]
[TD]0.73%[/TD]
[TD]-0.70%[/TD]
[TD]-4.77%[/TD]
[TD]-2.88%[/TD]
[TD]-3.73%[/TD]
[/TR]
[TR]
[TD]Fri 07/18/2014 BO[/TD]
[TD="align: left"]
clip_image004.png
0.60%

<tbody>
</tbody>
[/TD]
[TD]-0.56%[/TD]
[TD]-0.56%[/TD]
[TD]-2.21%[/TD]
[TD]-3.08%[/TD]
[TD]-3.64%[/TD]
[TD]-4.17%[/TD]
[/TR]
[TR]
[TD]Fri 07/19/2013 BO[/TD]
[TD="align: left"]
clip_image004.png
2.45%

<tbody>
</tbody>
[/TD]
[TD]4.61%[/TD]
[TD]4.61%[/TD]
[TD]4.57%[/TD]
[TD]4.31%[/TD]
[TD]3.13%[/TD]
[TD]2.96%[/TD]
[/TR]
[TR]
[TD]Fri 07/20/2012 BO[/TD]
[TD="align: left"]
clip_image004.png
0.45%

<tbody>
</tbody>
[/TD]
[TD]0.35%[/TD]
[TD]0.36%[/TD]
[TD]0.88%[/TD]
[TD]5.69%[/TD]
[TD]4.71%[/TD]
[TD]6.36%[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Fri 10/16/2015 BO[/TD]
[TD="align: left"]
clip_image004.png
2.06%

<tbody>
</tbody>
[/TD]
[TD]3.38%[/TD]
[TD]3.38%[/TD]
[TD]2.67%[/TD]
[TD]5.28%[/TD]
[TD]4.85%[/TD]
[TD]5.74%[/TD]
[/TR]
[TR]
[TD]Fri 10/17/2014 BO[/TD]
[TD="align: left"]
clip_image004.png
3.09%

<tbody>
</tbody>
[/TD]
[TD]2.35%[/TD]
[TD]2.35%[/TD]
[TD]4.94%[/TD]
[TD]5.73%[/TD]
[TD]5.81%[/TD]
[TD]8.70%[/TD]
[/TR]
[TR]
[TD]Fri 10/18/2013 BO[/TD]
[TD="align: left"]
clip_image004.png
2.14%

<tbody>
</tbody>
[/TD]
[TD]3.52%[/TD]
[TD]3.52%[/TD]
[TD]5.42%[/TD]
[TD]4.86%[/TD]
[TD]6.84%[/TD]
[TD]7.77%[/TD]
[/TR]
[TR]
[TD]Fri 10/19/2012 BO[/TD]
[TD="align: left"]
clip_image004.png
-1.31%

<tbody>
</tbody>
[/TD]
[TD]-3.41%[/TD]
[TD]-3.43%[/TD]
[TD]-6.69%[/TD]
[TD]-7.44%[/TD]
[TD]-7.67%[/TD]
[TD]-8.42%[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
So do you just want to sort the dates so they are together by month? I assume you have tried to sort, but that doesn't work? If it doesn't work then the "Dates" in column A must be Text and not actual dates. If that is the case, I think you will need to use a helper column. I would insert a new column A with a heading of "Month" and use this formula to sort on (where your "Date" column is now in column B):

=MID(TRIM(B1),5,2)

Then you can sort on the new column A;

If you what an actual date to sort on so the data is in date order, try this formula instead in column A (format the range to Short Date):

=DATEVALUE(MID(TRIM(C1),5,10))

Now you can put the date in actual date sequence and all months will be together. If I missed what you need, let me know.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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