how can I get my macro to check the website for the Words Real estate its self?

tonywatsonhelp

Well-known Member
Joined
Feb 24, 2014
Messages
3,194
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Hi everyone,
I have a list of websites in column A
I need to check each website to see if it is a real estate site or not.
I have a macro that works great and allows me to do this manually, however it has occurred to me that a lot of the site I go to have the word real estate on the page that opens up!
It would be a massive time saver if I could set my macro up to look at this site and see if it contained the words real estate for me?


Currently the code below open up the websites one at a time, asks me if its a good site, I say yes or no and it records my answer in column B & C,

can someone adjust to the code so instead of asking me if its a good site, it looks at the website itself and if it finds the word real estate it answers yes, if not it answer no?


this is the code:

Code:
Sub Start()
Dim ans
Dim one
one = 2
one = InputBox("What row do you want to start on", "Hello", "2")
'If you click on the Cancel button it will stop the script
Lastrow = Range("A1").End(xlDown).Row
For I = one To Lastrow
On Error Resume Next
    Cells(I, 1).Select
    Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
    Msg = "Is This A Good Site ? "
        
        ans = MsgBox(Msg, vbQuestion + vbYesNoCancel)
        If ans = vbYes Then
        Call Macro1
        Cells(I, 2) = "Good site"
        ActiveWorkbook.save
        End If
        If ans = vbNo Then
        Call Macro1
                Cells(I, 3) = "bad"
        
        ActiveWorkbook.save
        End If
        If ans = vbCancel Then Exit Sub
     
        
        
        Next
        one = ""
        
        
        
        End Sub

hope someone can help

Thanks

Tony
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
posted this yesterday, wondering if anyone had any ideas how it could be done?
 
Upvote 0

Forum statistics

Threads
1,214,825
Messages
6,121,787
Members
449,049
Latest member
greyangel23

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