Help please, extract data from website using VBA incorrect format

SeanKC1989

New Member
Joined
Oct 9, 2018
Messages
13
Hey guys and girls,

I have managed to create a macro to pull data from a website but the format of the data is not correct at all.
What I need to do is add a few lines that will search column A for data, If column A has no data for that row then it can be assumed to be data related to the row above.

I have attached an example that should show what I mean but any clarification required then just ask.

Any help is appreciated, thanks guys

Below is the currently used Macro in VBA

Sub getetrackerdata()
'
' getetrackerdata Macro
'


'
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;"
, Destination:=Range("$A$1"))
.CommandType = 0
.Name = _
"iss_predefined_reports.asp?Tab=reports&ProjectID=SVOIATF&ReportID=1424530&public_report=Y_1"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "13"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
ActiveWindow.SmallScroll ToRight:=0
ActiveWindow.SmallScroll Down:=-345
Rows("2:5").Select
End Sub

Won't let me upload anything for some reason so here goes with creating table here
Header 1Header 2Header 3Header 4Header 5678910
1asdsdasasdasdsdasdasdasdsad
sdasdasdasad
2sadsdsd
sdasdasdasdasdsad
3sdsadasdsadasdasdasasdasdasss
4sdsadasdasasdassds
5sdasdasdasdass
sdasdasdasdasdasdsdssd
6asasfsdfasdasdass
ssssdsadsasas
ssdasdsas

<tbody>
</tbody>

If column A (the number) has data, I would like the whole row to be included in that table row, if column A has no data then I would like the whole row to be included with the previous Row of data
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

Forum statistics

Threads
1,215,064
Messages
6,122,937
Members
449,094
Latest member
teemeren

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top