adding rows based on dates

StartingOut

Board Regular
Joined
Feb 1, 2011
Messages
92
Hi all, I have a workbook with 3 tabs, on sheet1 I have a Date picker form to enter the date in each cell in column A, in column B I have serial numbers (but it doesn’t really matter I could have bananas in column B) The dates selected in column A will represent the days of the month like column A row 1, 2, 3, 4 could have May 2<SUP>nd</SUP> as the date and row 5. 6. 7 could have May 3<SUP>rd</SUP> as the date. On sheet 2, I have a summary of all the days of the month in Column B (1<SUP>st</SUP>, 2<SUP>nd</SUP>, 3<SUP>rd</SUP> etc). What I need is code that will search Sheet1 Column A and find all the dates for the first of the month and then add how many there are and put that total in sheet2 column C row 2 then find all the dates for the next day of the month and put that in column C row 3 all the way through to the end of the month.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
You could use the SUMIF function...

Sheet2 cell C2
=SUMIF(Sheet1!A:A, B2, Sheet1!B:B)

B2 has to be a date e.g. May, 1, 2011. You could have the dates formatted to just display as a day of the month.
 
Last edited:
Upvote 0
thank you, it turns out I needed the COUNTIF not the SUMIF but you pointed me in the right direction when I was lost. thanks for the help its appriciated.
 
Upvote 0

Forum statistics

Threads
1,224,542
Messages
6,179,421
Members
452,913
Latest member
JWD210

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