Macro needed for variable data chart!

eddy

Well-known Member
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

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
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.

Replies
1
Views
99
Replies
2
Views
280
Replies
1
Views
145
Replies
5
Views
386
Replies
0
Views
334

1,203,224
Messages
6,054,237
Members
444,711
Latest member
Stupid Idiot

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.

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

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