Hi everyone,
I'm looking to manually create a sitemap using Excel VBA.
In column A I have a list of all the urls (around 200,000) but there could be an unlimited amount, in column B I have a priority list of 0.0 to 1.0 and column C has a last modified date/time.
Between these cell values there is XML markup
http://i56.tinypic.com/2hhdcoi.jpg - Example of input
http://i52.tinypic.com/10qvrtl.jpg - Example of output
So far I have been able to add the first two values together but is there a better way of doing this without using 3 loops?
Also sometimes a lastmod time is not always present so the contents of the xml markup should not be visible.
The xml code needs to sit on new lines as shown in the example output so do you know if there is a way to force each of the blocks of data onto a new line?
Many thanks in advance.
Ryan
I'm looking to manually create a sitemap using Excel VBA.
In column A I have a list of all the urls (around 200,000) but there could be an unlimited amount, in column B I have a priority list of 0.0 to 1.0 and column C has a last modified date/time.
Between these cell values there is XML markup
http://i56.tinypic.com/2hhdcoi.jpg - Example of input
http://i52.tinypic.com/10qvrtl.jpg - Example of output
So far I have been able to add the first two values together but is there a better way of doing this without using 3 loops?
Also sometimes a lastmod time is not always present so the contents of the xml markup should not be visible.
The xml code needs to sit on new lines as shown in the example output so do you know if there is a way to force each of the blocks of data onto a new line?
Code:
Sub createSitemap()
Dim siteUrl As Variant
Dim siteUrlPriority As Variant
Range("D1").Select
For Each siteUrl In Range("B1:B2")
For Each siteUrlPriority In Range("A1:A5")
ActiveCell.Formula = siteUrl & " " & siteUrlPriority
ActiveCell.Offset(1, 0).Select
Next
Next
Range("D1").Select
End Sub
Ryan