Issue with "ftp" in Excel

3

I wanted to simply put the text

ftp 1.1.1.1

into a cell in a large existing Excel spreadsheet.

I did not want to kick off ftp from the spreadsheet.

When I went to save the spreadsheet, I got the message: Errors were detected while saving '...'. Microsoft Excel may be able to save the file by removing or repairing some features. To make the repairs in a new file, click Continue. To cancel saving the file, click Cancel.

I didn't see an indication that the ftp text was the line which was causing the issue.

I eventually found the line which was causing the issue.

Then, I added a single quote to the front of the text, as a work-around.

'ftp 1.1.1.1

I thought the error was probably caused by one of the lines I recently added or changed, so that narrowed it down a little. Is there any way other than trial and error to find which recently added or changed line is causing this type of error?

Dan Cron

Posted 2015-12-09T16:47:11.303

Reputation: 133

Answers

3

A hyperlink with an invalid address field is causing this issue.

Consider using VBA code to find (and remove) invalid hyperlinks.

Sub RemoveInvalidHyperlinks()
    Dim hl As Hyperlink
    For Each hl In Cells.Hyperlinks
        'If Address contains a space, it is invalid.
        If InStr(hl.Address, " ") > 0 Then
            hl.Delete 'Note: the text within the cell will remain.
        End If
    Next
End Sub

Note: The code could be modified to highlight, notify, or otherwise flag an invalid Hyperlink.

You may also consider disabling the following: Settings, Proofing, AutoCorrect, AutoFormat As You Type, Internet and network paths with hyperlinks.

Steven

Posted 2015-12-09T16:47:11.303

Reputation: 24 804

2

Excel is interpreting your text as a hyperlink ( a bad hyperlink) and is trying to fix this.

Gary's Student

Posted 2015-12-09T16:47:11.303

Reputation: 15 540