Using a number as a reference to add a column

jdhfch

Board Regular
Joined
Jan 25, 2018
Messages
69
Office Version
  1. 365
Platform
  1. Windows
HI,

I have a list of data as:

January 473
February 399
March 706
April 658
May 527
June 733
July 691
August 726
September 635
October 884
November 1,049
December 352
<colgroup><col width="64" style="width: 48pt;"> <col width="69" style="width: 52pt; mso-width-source: userset; mso-width-alt: 2523;"> <tbody> </tbody>

I want to add the rows based on the month.eg in Feb, I want to add Ja & Feb (row 1 & 2) etc. I will extract the row number from the date, I just don't know how to construct the formula?

Please can anyone help
Rgds

jdhfch
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Assume your data is in columns A & B. In C1, type =SUM($B$1:B1) and copy down.
 
Upvote 0
Sorry, I meant to do this dynamically without adding any columns. for instance, In April, I want it to add four rows, in June 6 rows etc. This would be by me extracting the month (4 for April) and then adding 4 rows up, or 6 for Jun etc?

Rgs

Jason
HI,

I have a list of data as:

January
473
February
399
March
706
April
658
May
527
June
733
July
691
August
726
September
635
October
884
November
1,049
December
352

<tbody>
</tbody>

I want to add the rows based on the month.eg in Feb, I want to add Ja & Feb (row 1 & 2) etc. I will extract the row number from the date, I just don't know how to construct the formula?

Please can anyone help
Rgds

jdhfch
 
Upvote 0
Are these month names or are these Excel dates formatted to display the month only?

You might want to add a year as well.
What happens when December goes into January? You'll have 2 Januarys in that list.

Maybe you should use a SUMIF comparing the date against today's date?
 
Upvote 0
Hi

I can't use the date as I only use the name of the months and there is only ever 1 year in the data. I don't know how to use a sumif for this. I can get it to extract 1 month, just not to add the relevant months together? This is why I thought that if I had a 6 for June, then the formula would add Ja, Feb, Mar,Apr, May & June (6 rows) etc?

Rgds

jdhfch
 
Upvote 0
=SUMPRODUCT((TODAY()>=(TEXT("01/"&A1:A12&"/"&YEAR(TODAY()),"dd/mm/yy")+0))*(B1:B12))
 
Upvote 0

Forum statistics

Threads
1,214,922
Messages
6,122,281
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