Count by month using 2 worksheets

AH4039

New Member
Joined
Mar 1, 2016
Messages
12
Hi - I need some help with a formula....

I want to add a formula to worksheet2 into cells A2 - B2 - C2 etc that adds the values from Worksheet1 column A if the date in column B equals that month of the year.

There will be lots of rows in worksheet1 so the formula needs to include the full column length

example below

Can anyone help please, I just need to get the basic formula working and I can then do the rest?

Worksheet1
Column A - Price (£)
Column B - Date

Worksheet2
ABC
1JanFebMar
2
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Something like this (for UK dates, format will need changing slightly for US dates).
Excel Formula:
=SUMIFS(Sheet1!$A:$A,Sheet1!$B:$B,">="&DATEVALUE("1 "&A$2&2021),Sheet1!$B:$B,"<="&EOMONTH(DATEVALUE("1 "&A$2&2021),0))
 
Upvote 0
Something like this (for UK dates, format will need changing slightly for US dates).
Excel Formula:
=SUMIFS(Sheet1!$A:$A,Sheet1!$B:$B,">="&DATEVALUE("1 "&A$2&2021),Sheet1!$B:$B,"<="&EOMONTH(DATEVALUE("1 "&A$2&2021),0))


Thanks for your help :) .... I've entered the formula but it returns a 0 value ... I've attached a screen capture to show the example. (I put the formula in sheet2 cell b2 to sum the jan values in sheet1)

I'm using UK dates
 

Attachments

  • Sheet1.png
    Sheet1.png
    11.4 KB · Views: 2
  • Sheet2.png
    Sheet2.png
    26.9 KB · Views: 2
Upvote 0
I misread the table in post 1 and saw the column letters as being the first row, with the months in the second row. The 2 references to A2 in the formula need to look to the cell that contains "Jan"
 
Upvote 0
I misread the table in post 1 and saw the column letters as being the first row, with the months in the second row. The 2 references to A2 in the formula need to look to the cell that contains "Jan"
Thanks, that did the trick :)
 
Upvote 0

Forum statistics

Threads
1,214,650
Messages
6,120,736
Members
448,988
Latest member
BB_Unlv

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