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
[TABLE="width: 500"]
<tbody>[TR]
[TD]Header 1[/TD]
[TD]Header 2[/TD]
[TD]Header 3[/TD]
[TD]Header 4[/TD]
[TD]Header 5[/TD]
[TD]6[/TD]
[TD]7[/TD]
[TD]8[/TD]
[TD]9[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]asd[/TD]
[TD]sdas[/TD]
[TD]asd[/TD]
[TD]asd[/TD]
[TD]sdas[/TD]
[TD]da[/TD]
[TD]sdas[/TD]
[TD]d[/TD]
[TD]sad[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]sda[/TD]
[TD][/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
[TD]sasa[/TD]
[TD][/TD]
[TD]s[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]s[/TD]
[TD]s[/TD]
[TD]d[/TD]
[TD]as[/TD]
[TD]dsa[/TD]
[TD][/TD]
[TD]s[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

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

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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