Converting date columns into numbered months

Anonymous321

New Member
Joined
Oct 12, 2021
Messages
32
Office Version
  1. 365
Platform
  1. Windows
Hey everyone
I'm struggling to think of a title that accurate describes what I want to do. Pretty much I have a columns with each month of the year, with the rows containing products, with the sale data being present in each cell under a certain month for each product. My question is, is it possible to convert this table so it shows how well the product has done for the first 12 months of its existence. For example, instead of a Table, having 15 sales under March 2022 (the first month of sales), it tells me there were 15 sales in its first month. This will be the idea for all products no matter when the we started to sell the product. Hopefully the tables below will help explain this better.


What I have now
ProductJan 2022Feb 2022March 2022April 2022
Table0056
Chair3120

What I want to convert it too
ProductMonth 1Month 2Month 3Month 4
Table56
Chair3120

Any help will be appreciated, thanks :)
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Try this

Book1
ABCDE
1ProductJan-22Feb-22Mar-22Apr-22
2Table0056
3Chair3120
4
5What I want to convert it too
6ProductMonth 1Month 2Month 3Month 4
7Table56  
8Chair312 
Sheet1
Cell Formulas
RangeFormula
B7:E8B7=IFERROR(INDEX($B2:$E2,AGGREGATE(15,6,COLUMN($B2:$E2)/($B2:$E2<>0),COLUMNS($B7:B7))-1),"")
 
Upvote 0
Try this

Book1
ABCDE
1ProductJan-22Feb-22Mar-22Apr-22
2Table0056
3Chair3120
4
5What I want to convert it too
6ProductMonth 1Month 2Month 3Month 4
7Table56  
8Chair312 
Sheet1
Cell Formulas
RangeFormula
B7:E8B7=IFERROR(INDEX($B2:$E2,AGGREGATE(15,6,COLUMN($B2:$E2)/($B2:$E2<>0),COLUMNS($B7:B7))-1),"")
This works, but I should probably have been more clear as to what I'm looking for. The two tables won't have the same order in the first column (e.g., "Tables" wont necessary be at the top of the bottom table). I also should've said that there would also be a column between the Product and Jan-22 columns, with the colour of the product (e.g. you would have two rows for Table black, and table white). I've added amended tables below. Apologies again, should've explained what I was looking for a bit more clearly.

Old table
ProductColourJan 22Feb 22Mar 22Apr 22
TableBlack001015
TableWhite06923
ChairBrown5676
ChairGrey4230

What I'm looking for
ProductColourMonth 1Month 2Month 3Month 4
ChairGrey4230
ChairBrown5676
TableBlack1015
TableWhite6923
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,249
Members
449,075
Latest member
staticfluids

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