Macro for Customer response time

  • Thread starter Thread starter Bren.ie
  • Start date Start date
B

Bren.ie

I have an Excel spreadsheet with a list of customers with a number o
transaction dates listed for each customer.

I want to write a macro to subtract the initial contact date from th
final contact date (and identify the number of days between both dates
for each customer.

Can anyone help
 
hi,
i have suppose than your name are in column1, your initial date column 2 and your last date column 3...
And i have just made a programe which will put in column 4 = column3 - column 2...then change the format of column 4 in number to have the number of day.....If i did not understand what you have ask, please describe more your spreadsheet.

public numberofday()

Range("D2").Select
ActiveCell.FormulaR1C1 = "=RC[-2]-RC[-1]"
Range("D2").Select
Selection.AutoFill Destination:=Range("D2:D400"), Type:=xlFillDefault
Columns("D:D").Select
Selection.NumberFormat = "0"

end sub
 
Thank you "~x" for your reply.
Unfortunately all the transaction dates appear in one column.

I need the macro to identify the first and last transaction dates for
each customer and subtract them.

I hope I'm not looking for the impossible.

With thanks

~× said:
*hi,
i have suppose than your name are in column1, your initial date
column 2 and your last date column 3...
And i have just made a programe which will put in column 4 = column3
- column 2...then change the format of column 4 in number to have the
number of day.....If i did not understand what you have ask, please
describe more your spreadsheet.

public numberofday()

Range("D2").Select
ActiveCell.FormulaR1C1 = "=RC[-2]-RC[-1]"
Range("D2").Select
Selection.AutoFill Destination:=Range("D2:D400"),
Type:=xlFillDefault
Columns("D:D").Select
Selection.NumberFormat = "0"

end sub *
 
Back
Top