Macro needed for variable data chart!

eddy

Well-known Member
Joined
Mar 2, 2002
Messages
521
I have a sheet (MainSheet) with rows of data.
The columns I am intersested in
are C (Which contains the date in the format 28/08/2002)
F (Which contains four options say either RED,GREEN,BLUE or YELLOW)
G (Which contains the number of items sold on that day)


I have another sheet (Stats). Within this sheet I would like to have a macro
which would select data from A6 down to the last row entry in G
Then be able to select data between two dates( C column) e.g 01/08/2002 - 01/09/2002
Then shown a graph containing numbers (G Col) of RED,GREEN, BLUE and YELLOW (F Col)
sold during the defined period.

I dont want to use Pivot Tables. Just enter a search from date and a serch to date

Any ideas appreciated.

eD
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
This is the answer, just in case anyone was following this thread.
eD


Set up the Chart Creation Sheet
1. Type headings for the date entry cells, e.g. C1: Start, E1: End
2. Select the two cells below (C2, E2) and choose Data>Validation
3. From the Allow dropdown, choose List
4. In the Source box, type an equal sign and the list name:
=DateList
5. Click OK
6. In an empty area of the sheet, enter the four colours in a column
(A5:A8 in this example)
7. In the adjacent cells, enter formulas to calculate the units sold in
the selected time period. For example, in B5:
=SUMPRODUCT((ColourList=A5)*(UnitList)*(DateList>=$C$2)*(DateList<=$E$2))
8. Copy the formula down to B8
9. Select cells A5:B8 and use the Chart Wizard to create a chart.
 
Upvote 0

Forum statistics

Threads
1,225,071
Messages
6,182,694
Members
453,132
Latest member
nsnodgrass73

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