I'm importing data into excel from an online phone log. It basically looks like this:
Date Time Duration Local Identity Number
14.12.2016 11:11 00:03 [email protected] 22252797
14.12.2016 10:33 00:02 [email protected] 25322678
I've successfully imported the data into Excel. However, the phone log itself is really annoying in that it only keeps data from the most recent call to any given number. I.e. if I make a call to the second number on the list above (25322678), I will lose the data on the previous call (made at 10:33). And this will be mirrored in Excel.
I am wondering whether there's a way to continuosly import new data without overwriting the old. It seems to me like there's no way of doing this by tweaking the import settings, so I'm considering different workarounds. I haven't been able to come up with anything remotely capable of this yet though.
This solution creates a worksheet named “PhoneLog” to hold the accumulated results of the "From web" function.
This procedure assumes that the results of the "From web" function are located in a worksheet named “WebFrom” in range
A:E
starting at row1
(change as required)This procedure must be located in the same workbook holding the results of the "From web" function.
Run this procedure the first time before updating the "From web" function in order to add the actual results to the "PhoneLog". Thereafter run this procedure immediately after the "From web" function.
This procedure creates the “PhoneLog” worksheet if it’s not found in the workbook. Then it adds to “PhoneLog” all new records from the “WebFrom” worksheet (change as required).
Suggest to read the following pages to gain a deeper understanding of the resources used:
Excel Objects, For Each...Next Statement, If...Then...Else Statement,
On Error Statement, Option Explicit Statement,
Range Object (Excel), Range.CurrentRegion Property (Excel), Range.Offset Property (Excel),
Range.PasteSpecial Method (Excel), Range.SpecialCells Method (Excel),
Using Arrays, Variables & Constants, With Statement, Workbook Object (Excel),
Worksheet.AutoFilter Property (Excel), Worksheet.Sort Property (Excel),
WorksheetFunction Object (Excel).