Using VBA to setup calender to determine sales quantity

D

deadknight89

Hi,

I have a problem with this:

I have a worksheet named Sales historical data:
Column A: Dates
Column B: Phone Description
Column C: Sales quantity

I need to get the total sales quantity for 5 days.
On the left hand side, i want to create a calender in which i can choose the
date. then on the right hand side, i want to create another calender in which
i can choose the date again.
So when i choose a date in both calender like for example, 17 Feb 2010 to 21
Feb 2010, the TOTAL sales quantity for all the 5 days will appear below.

Can anyone assist me?

If cannot, is there any other alternatives?

Thank you!!!!!!
 
B

Billy Liddel

One way:

Dates are in Column A values in column C

add a combo box to the sheet. In properties select Input Range A:A For link
cell I used D2 - you can use a cell behind the combo box. Copy the combo box
and set the link cell to D3.

The formula to find the sum between the two selected dates is:

=SUM(OFFSET(INDIRECT("C"&D2),0,0,D3-D2+1))

In Excel 2003 or earlier choose View, Toolbars, Forms click on the combo box
tool and draw it on the screen. The properties form is called automatically.

In Excel 2007, choose Developer, Insert Controls and select the Form combo
box.
Click on the Properties icon in the same group and set the properties as
above.

HTH - if so click 'Yes'
Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top