Copy Cell Contents to another Sheet based on month date range

brotherj74

New Member
Joined
Mar 24, 2015
Messages
1
Hello Everyone - I am a newb here and quite the amateur with excel. That being said, I have been able to muddle my way through excel formulas/functions for a spreadsheet I have created to track incidents.

In a nutshell, I have (Sheet1) a column for the date (B4:B100), followed by a column named Incident Category (C4:C100) and then followed by a column named Sub-Incident category (D4:D100). I am using 100 as a range but the number could be more or less depending how many incidents get recorded. Both incident and sub incident columns have associated drop down lists. The value selected from the Incident Category determines the drop down list for Sub-Incident Category. There are other columns (beyond Column D) associated with each incident but they are inconsequential for what I am looking to do.

I am sure there are a ton of more elegant and proper ways to do what I am looking to do, but I was able to copy the contents of the date cells, incident cells and sub-incident cells to another sheet (sheet2) by using the =Sheet1!B4 , =Sheet1!C4 , =Sheet1!D4 formula in the corresponding columns of sheet2 and then copying that formula down to row 100. Whenever I change one of the cell contents I am referring to in Sheet1, the change appears in the appropriate cell in Sheet2.

From there I used =COUNTIF formulas to enumerate matching incident and sub-incidents. I essentially created a table of total (by number) incident count along with each corresponding sub-incident count.

From there I am able to create a nice looking bar chart for metrics.

The problem is, I can't seem to figure out a way to create the chart based on a date range.

So what I would like to achieve, is a formula or vba to replace the simple =Sheet1!B4 etc copy formula with something that would copy data to Sheet2 based upon a date range. That way I could run the chart for 1-month, or 3-months or 1-year etc. Something that checked the date range in column B, and then copied the next two adjacent cells to another sheet (like Sheet2). My COUNTIF logic would still work and subsequently my bar chart would reflect said date range.

Any help is appreciated.

Thank you.
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Forum statistics

Threads
1,223,236
Messages
6,170,915
Members
452,366
Latest member
TePunaBloke

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