can this not be done?

S

scottwilsonx

Is the reason no one has come back to me because it cant be done?!

Thanks
Scott.

Hope someone can help with the following:

I have a worksheet ("data") with the following details:
range: A2:AO20000

column S is the country of customer
column C date order placed
column D data order sent
column R customer
column V product bought

What I would like my VBA to do is take this information, and then i
another sheet called "analysis" use the information typed into cell A1
customer area
and A2: customer name

And calculate for each product bought by the customer, the average tim
between column C and column D.
Note where nothing is displayed in cell A1 in "analysis" then th
result of the VBA would give all customers.

Help please !

Thank you,
Scott
 
P

Paul Lautman

Why not add a column that calculates the time between C & D and then use a
Pivot Table to perform the averaging. Then you can filter the pivot table
using its selection popups.
 
S

scottwilsonx

Thanks for the message, but I would really like it to be a bit mor
automated than that, and the enduser should be able to select from
list of available areas / names etc and then have the code run th
calculations for them rather than play with pivot tables.

If worst comes to worst, i will have to use pivot tables as I thin
this particular query has stumped everyone.

Thanks

Scott
 
P

Paul Lautman

But a Pivot table allows a user to select from a list of available names
already.

And I don't think it has stumped everyone. However from very sparse
information you have asked for a largish macro and appear to have waited a
very short time before asking why no one had yet supplied what you asked
for.

YMMV
 
B

Brett

I have this solved. I'll send you the code when I get out
of my meeting. (a few hours)
 
S

scottwilsonx

Very sorry if it seemed that way, not intended. However I tried a ne
way of looking at the data and have managed to link 2 pivot table
together which, in a round about way gives me what I want.

Thank
 

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