Each month I download a workbook containing approximately 20K call detail records. What I am trying to do is sort the call detail records by column "F" ("Transfer Dest") and then subtotal on column "J" (Duration). Duration is how many seconds were used for that telephone number.
For example, telephone number (Transfer Dest) 2048082561 was used for 3210 seconds (Duration).
So far, I have been able to use VBA to sort on Column "F" (Transfer Dest) and subtotal on column "J" (Duration) and collapse the outline to provide only the telephone numbers with their summed
minutes of use column "J" (duration). Once the subtotal has completed, my records that I need to keep track of reduced from approximately 20k to approximately 100 transfer numbers that I need to keep track of.
Here is my problem that I need help with - When I run my code it will copy the telephone number from worksheet labeled "Raw Data" and pastes that number to worksheet labeled "Import To DB" perfectly. When the code copies the numbers in column "J" (duration) and pastes it to the worksheet labeled "Import To DB" I receive the error #REF! instead of the duration time (seconds). It pastes the formula and not the value into the cell. how can I copy and paste only the values in the duration column?
If you see the attached workbook you will see on the "Raw Data" sheet what I am copying and, on the worksheet, "Import To DB" you will see the errors shown on the two worksheets named above. Please see the workbook labeled "Transfer Report" for details. I have my code in the workbook for your review.
Any help or suggestions would be greatly appreciated. Thank you in advance for your time and knowledge in this matter. If there is a better way or more efficient way of completing this task, I am all ears.
Below I have pasted my code and the error comes from this line: c.Offset(0, 4).Copy Destination:=Worksheets(4).Cells(i, 4)
Bookmarks