date problem

kin

Well-known Member
Joined
Jun 26, 2007
Messages
648
hello

I d like to ask you if you could help me find a solution. I have two columns one called "date of order" and another "value of order" .The rows in These 2 columns are not always filled. Only when there is an order there is a date too. Now I want to find how many days on average it takes me until I have a new order. What is the date difference between each order and then the average (in days). How can I find it?Thanks
 
I forgot to mention that it would be nice to see the extracted data in another sheet
 
Upvote 0

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
hello

I d like to ask if you could help me with finding which customers have not been visited for a given time period (e.g a month)
I have the following data look like:

CUSTOMER NAME DATE OF VISIT
JAMES J. 28/1/2014
KATE L. 28/1/2014
JOHN M. 28/1/2014
JAMES J. 25/3/2014
KATE L. 25/3/2014
JOHN M. 25/4/2014

I wish to retrieve the whole rows that there are for each customer. Hence I would know that one customer has not been visited in the last month or more than a month. Thank you

If I understand correctly what you want, maybe this can helps:

Layout

CUSTOMER NAMEDATE OF VISIT Start DateEnd DateRow #CUSTOMER NAMEDATE OF VISIT
JAMES J.28/01/2014 01/01/201431/01/20144JAMES J.25/03/2014
KATE L.28/01/2014 5KATE L.25/03/2014
JOHN M.28/01/2014 6JOHN M.25/04/2014
JAMES J.25/03/2014
KATE L.25/03/2014
JOHN M.25/04/2014
***************************************************************************************
<colgroup><col width="87" style="width: 65pt; mso-width-source: userset; mso-width-alt: 3181;"> <col width="72" style="width: 54pt; mso-width-source: userset; mso-width-alt: 2633;"> <col width="17" style="width: 13pt; mso-width-source: userset; mso-width-alt: 621;"> <col width="63" style="width: 47pt; mso-width-source: userset; mso-width-alt: 2304;" span="2"> <col width="37" style="width: 28pt; mso-width-source: userset; mso-width-alt: 1353;"> <col width="87" style="width: 65pt; mso-width-source: userset; mso-width-alt: 3181;"> <col width="72" style="width: 54pt; mso-width-source: userset; mso-width-alt: 2633;"> <tbody> </tbody>

Formulas

Code:
F2 - use Ctrl+Shift+Enter to enter the formula

=IFERROR(SMALL(IF((Sheet1!$B$2:$B$7<$D$2)+(Sheet1!$B$2:$B$7>$E$2),ROW(Sheet1!$B$2:$B$7)-ROW(Sheet1!$B$2)+1),ROWS(F$2:F2)),"")

And copy down.

In G2

=IF($F2="","",INDEX(Sheet1!A$2:A$7,$F2))

And copy to the right and down.

Markmzz
 
Upvote 0
In column E I have this =IFERROR(SMALL(IF((Sheet1!$B$2:$B$1000<$D$2)+(Sheet1!$B$2:$B$1000>$C$2);ROW(Sheet1!$B$2:$B$1000)-ROW(Sheet1!$B$2)+1);ROWS(E$2:E2));"")

in column F I have this formula =IF($E2="";"";INDEX(Sheet1!A$2:A$1000;$E2))
which gives the names

and finally In G i have =IF($F2="";"";INDEX(Sheet1!A$2:A$1000;$F2))
which returns the #VALUE! error. So i don t see the dates. Column E and F though give row number and customer name respectively

thanks
 
Upvote 0
In column E I have this =IFERROR(SMALL(IF((Sheet1!$B$2:$B$1000<$D$2)+(Sheet1!$B$2:$B$1000>$C$2);ROW(Sheet1!$B$2:$B$1000)-ROW(Sheet1!$B$2)+1);ROWS(E$2:E2));"")

in column F I have this formula =IF($E2="";"";INDEX(Sheet1!A$2:A$1000;$E2))
which gives the names

and finally In G i have =IF($F2="";"";INDEX(Sheet1!A$2:A$1000;$F2))
which returns the #VALUE! error. So i don t see the dates. Column E and F though give row number and customer name respectively

thanks

Hi Kin,

Try this:

ABSheet1CDEFGSheet2
1CUSTOMER NAMEDATE OF VISIT Start DateEnd DateRow #CUSTOMER NAMEDATE OF VISIT
2JAMES J.28/01/2014 01/01/201431/01/20144JAMES J.25/03/2014
3KATE L.28/01/2014 5KATE L.25/03/2014
4JOHN M.28/01/2014 6JOHN M.25/04/2014
5JAMES J.25/03/2014
6KATE L.25/03/2014
7JOHN M.25/04/2014
*******************************************************************************************************
<colgroup><col width="27" style="width: 20pt; mso-width-source: userset; mso-width-alt: 987;"> <col width="87" style="width: 65pt; mso-width-source: userset; mso-width-alt: 3181;"> <col width="72" style="width: 54pt; mso-width-source: userset; mso-width-alt: 2633;"> <col width="42" style="width: 32pt; mso-width-source: userset; mso-width-alt: 1536;"> <col width="63" style="width: 47pt; mso-width-source: userset; mso-width-alt: 2304;" span="2"> <col width="37" style="width: 28pt; mso-width-source: userset; mso-width-alt: 1353;"> <col width="87" style="width: 65pt; mso-width-source: userset; mso-width-alt: 3181;"> <col width="72" style="width: 54pt; mso-width-source: userset; mso-width-alt: 2633;"> <col width="42" style="width: 32pt; mso-width-source: userset; mso-width-alt: 1536;"> <tbody> </tbody>

Formulas

Code:
In E2 - use Ctrl+Shift+Enter to enter the formula

=IFERROR(SMALL(IF((Sheet1!$B$2:$B$7<$C$2)+(Sheet1!$B$2:$B$7>$D$2),ROW(Sheet1!$B$2:$B$7)-ROW(Sheet1!$B$2)+1),ROWS(E$2:E2)),"")

And copy down.

In F2 - use Enter to enter the formula

=IF($E2="","",INDEX(Sheet1!$A$2:$B$7,$E2,MATCH(F$1,Sheet1!$A$1:$B$1,0)))

And copy down.

In G2 - use Enter to enter the formula

=IF($E2="","",INDEX(Sheet1!$A$2:$B$7,$E2,MATCH(G$1,Sheet1!$A$1:$B$1,0)))

And copy down.

Markmzz
 
Upvote 0
Hi Kin,

Here is my full layout:

ABCSheet1ABCEIJKSheet2
1CUSTOMER NAMEDATE OF VISIT1Start DateEnd DateRow #CUSTOMER NAMEDATE OF VISIT
2JAMES J.28/01/2014201/01/201431/01/20144JAMES J.25/03/2014
3KATE L.28/01/201435KATE L.25/03/2014
4JOHN M.28/01/201446JOHN M.25/04/2014
5JAMES J.25/03/20145
6KATE L.25/03/20146
7JOHN M.25/04/20147
***********************************************************************************************************************

<tbody>
</tbody>

Markmzz
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,124
Messages
6,123,187
Members
449,090
Latest member
bes000

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