PowerUp Description
The pwrISBROKENURL PowerUp function determines whether the provided URL is broken or not. This is very useful in checking the status of links or verifying a set of links you have created point to live content.
PowerUp Syntax
pwrISBROKENURL(TargetURL, [VerificationMode], [Pattern])
The pwrISBROKENURL PowerUp function has the following arguments:
TargetURL – Required. This is the URL or reference to a URL you want to test.
VerificationMode – Optional. This is one of “STATUS”, “TITLE”, or “URL”. The default value is “STATUS”. Use STATUS when you want to check the HTTP status code returned only. Use TITLE or URL when you want to look for specific strings within the page title or URL.
Pattern – Optional. However, if VerificationMode is either “TITLE” or “URL” this parameter is required. The default value of the pattern is an empty string.
Return Value
pwrISBROKENURL will return TRUE if the URL is broken. For example, if the page returns a 404 error code pwrISBROKENURL will return TRUE. FALSE will be returned if the URL is not broken.
Remarks
If the URL redirects to another URL (that is valid), the URL will considered to be good and FALSE will be returned indicating the URL tested is not broken.
Sometimes, a custom “404” page will return a HTTP status code of 200 which indicates a valid page. In these cases, use either the TITLE or URL verification mode to look for text strings that would indicate a 404 or missing content page was returned.
If a page’s HTTP return code is 404, the TITLE and URL verifications are bypassed.
Examples
=pwrISBROKENURL("https://officepowerups.com/brokenurl.html")
=pwrISBROKENURL("https://officepowerups.com/", "TITLE", "Page Not Found")
[…] pwrISBROKENURL […]
Tried both and neither worked. Opened a Corrupt file that was just random symbols.
Hi Paul,
Did you by chance install the 64-bit version of the addin onto a 32-bit version of Excel (or vice-versa)? If you may have done that, try uninstalling (from the Start menu – NOT from the Control Panel) and then installing the version with a matching bit-level.
Thanks,
Charlie
tried pwrisbrokenurl(https://prodimage.images-bn.com/pimages/9781337349130_p0_v1_s192x300.jpg) and it returned false, but there is no image
Hi, I checked the link you noted and there is actually an image returned. The image is an image of a box saying “image not available”. The status code returned from the link you gave is 200, meaning the link was good.