You could probably use a macro like this:
Private Sub Worksheet_Change(ByVal target As Range)
If Not Intersect(target, Range("A1")) Is Nothing Then
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.companylookup.co.uk/company/" & Range("A1"), Destination:=Range( _
"A2"))
.Name = Range("A1")
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End If
End Sub
to detect if cell A1 has changed and load a web query of the company registration in A1 in A2. I'm not sure if it would work with companies house though, the site above uses the reference number in the http address which makes it a bit easier.
To use this, press alt+F11 to open the vba editor, click the sheet object module in the project explorer it applies to and paste the code into that module.
Bookmarks