Originally I was manually entering data from a website into excel. It was time consuming and frustrating. Then I discovered Excel's web query tool. I used the web query tool and was able to scrape all the data into column B. It now looks something like this:
|
Event Name |
|
|
Date |
|
|
Name(s) |
|
|
Number |
|
REPEAT
I was able to use a macro I found on microsoft support to remove other superfluous data that came in with the scrape and then delete the empty row and shift up. I only need the event name, the date, and the Name(s) from that data. I was not able to adjust the macro to remove the cells with random numbers though.
Sub DeleteCells3()
Dim rng As Range, i As Integer
'Set the range to evaluate to rng.
Set rng = Range("A1:A10")
'Loop backwards through the rows
'in the range that you want to evaluate.
For i = rng.Rows.Count To 1 Step -1
'If cell i in the range contains an "x", delete the entire row.
If rng.Cells(i).Value = "x" Then rng.Cells(i).EntireRow.Delete
Next
End Sub
What I'd like is for the table to look like this:
Date |
Event Name |
Name(s) |
Date |
Event Name |
Name(s) |
Can anyone help me with creating a macro that will go though and format the table the way I have shown? Thanks for any advice!
Bookmarks