How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask Bryan Your Own Question

Bryan
Bryan, Computer Enthusiast
Category: Microsoft Office
Satisfied Customers: 1370
Experience:  Have been using MS Office since
Type Your Microsoft Office Question Here...
Bryan is online now
A new question is answered every 9 seconds

I have websites listed in Column A (A1 .. A2 .. A3 .. An) and

Customer Question

I have websites listed in Column A (A1 .. A2 .. A3 .. An)
and keywords in Column B (B1 .. B2 .. B3 .. Bn) etc.

I want to use google to search, in website An, the keyword in Bn and I want the search count (i.e. keywords found in the website) (not the links or content) to be displayes in column C .

How can I do this ? Win7, IE9, Excel2010 32 bit.
Submitted: 8 months ago.
Category: Microsoft Office
Expert:  Bryan replied 8 months ago.

Bryan :

Welcome to JustAnswer. My name is XXXXX XXXXX I will be assisting you today. Please do not rate this session until it has been completed.

Bryan :

Do you want this to be done for you, or do you want some tutorials that will show you how to do it?

Customer:

Hello Bryan - I just want this done for me - as in if you can create a function that I can copy and start using that would be ok.

Customer:

I anticipate using it several times in an excel sheet and go through maybe a hundred websites and 30 keywords - so a function that can take a webseite name from an excel cell and a keyword from another cell and do a google search and return the number of times the keyword was found in that particular website. I can do this manually - just do not know how to put all this into excel. In google search I use the site:sitenamehere.com keyword option and it works.

Bryan :

Ok, well this isn't a quick function to write, that's the only problem. But if you want to send me the spreadsheet (or even just a sample spreadsheet with like 5 rows or something) then I can get going on it a little later tonight. Although the price is a bit low for this. I would have to submit a request for price adjustment. However, if you would like tutorials, I can get you those to see if you can walk through it yourself and then you can let me know. Does that sound okay?

Customer:

We can talk price adjustment if needed - I am ok with that. In either case what you create for me I may decide to fine tune

Customer:

so let me send you an sample spreadsheet ..

Bryan :

Ok. You can either attach it here using the paperclip, or through wikisend.com.

Customer:

I am open to tutorials but do not want to spend too much time reading and then finding out I cannot do it myself .. ha..ha..

Bryan :

No problem at all. Just wanted to present the option. :)

Bryan :

I'm going to have to run in a couple minutes. But if you haven't sent the spreadsheet before I go, I'll grab it as soon as I return in about an hour.

Customer:














































keywords-->>safespeedluxuryreliable
www.chevrolet.com
www.buick.com
www.gmc.com
www.cadillac.com
So in D2 it should display how many times the keyword "safe" was found in www.chevrolet.com
in E3 it should display how many times the keyword "speed" was found in www.buick.com
This is not my actual application but I am using a very similar example.
Customer:

I better attach the spreadsheet somehow .. how can I do that ?

Bryan :

It would be best if you could zip and attach the actual spreadsheet.

Customer:

I haven't zipped files on this computer ever .. how do I do that ?

Bryan :

Are you on Windows?

Customer:

yes

Bryan :

WindowsKey+e, find the spreadsheet file, right-click and select "Send To - Compressed (zipped folder)"

Customer:

ok zipped it .. now do i attach or email ?

Bryan :

Attach it using the paperclip icon

Customer:

did it make it ?

Bryan :

Yep, got it.

Bryan :

I'll get started on this in about an hour or so and write back once I've got something for you, okay?

Customer:

Great. Thanks.

Bryan :

ttys

Bryan :

I've run into a little problem. It's against the JustAnswer rules for me to violate another companies terms of service. And this was just pointed out to me:

5.3 You agree not to access (or attempt to access) any of the Services by any means other than through the interface that is provided by Google, unless you have been specifically allowed to do so in a separate agreement with Google. You specifically agree not to access (or attempt to access) any of the Services through any automated means (including use of scripts or web crawlers) and shall ensure that you comply with the instructions set out in any robots.txt file present on the Services.

So, while I'm not allowed to do this myself, I am allowed to offer limited guidance. The normal web search query in Excel will not do what you want. It will only return the actual page. But, there is a Google AdWords API that is easily integrated into Excel. Please take a look at this page, download and install the API, go as far as you can and let me know if you have questions. I'll do my very best to help, so long as I don't violate the Google TOS.

Bryan :

Let me know if you get stuck.

Customer:

ok - thanks I will give it a try.

Customer:

But will I have to write some VB code to make this work in excel ?

Bryan :

There are examples in the API that you download. And examples on the page I linked so it should be easyy to follow and change for your own needs. But, please feel free to ask me about some specifics if you get stuck.

Customer:

The examples of the API usage that I saw on the video are looking at the whole web or mobile devices within a country.

Customer:

I am interested in specific websites..do the APIs support that ?

Customer:

Also I am getting stuck trying to get past the Adwords API Center registration - even though I have two existing

Customer:

Gmail accounts.

Bryan :

Yeah, the intro page explains that it's easier to just create another account for that. And I believe that as long as you leave out the country parameter, it will search the default site.

Customer:

And what would the default site be .. do we specifiy it ?

Bryan :

Yes, as a parameter.

Customer:

ok - I will keep trying to register.

Bryan :

Ok

Customer:

Got past registration for Adwords API access .. now which if the 5 or 6 APIs am I to download ? New Java ?

Customer:

which of the

Customer:

Downloaded everything I need .. I think .. but get error messages when I try some things.

Customer:

Chat with you when you get back online ..late night here.

Bryan, Computer Enthusiast
Category: Microsoft Office
Satisfied Customers: 1370
Experience: Have been using MS Office since
Bryan and 3 other Microsoft Office Specialists are ready to help you
Expert:  Bryan replied 8 months ago.
Our chat has ended, but you can still continue to ask me questions here until you are satisfied with your answer. Come back to this page to view our conversation and any other new information.

What happens now?

If you haven’t already done so, please rate your answer above. Or, you can reply to me using the box below.
Expert:  Bryan replied 8 months ago.
Alright, let me know the commands you're sending along with the error messages. Talk to you when you come back online.
Customer: replied 8 months ago.


So in my excel spreadsheet, I try to make the getAdWords function work like it is supposed to with regular parameters and I get error message right in excel that says "Error:System.Reflection.TargetInvocationException - Could not find file 'C:\Users\HOMEPC-9\Local\Temp\ei4ykvdw.dll'.


 


I was trying =getAdWords("catfood","STATS","EXACT","US","MOBILE").


 


This is the error I am getting this morning - but last night I was getting an authentication error on the same spot before I shut things down for the night.

Expert:  Bryan replied 8 months ago.
Can you verify that the file is there?

C:\Users\HOMEPC-9\Local\Temp\ei4ykvdw.dll

Just hit WindowsKey+E, then navigate to C:\Users\HOMEPC-9\Local\Temp and look for the file ei4ykvdw.dll

Let me know what happens
Customer: replied 8 months ago.


Under HOMEPC-9 ther rest of the folders cannot be found ..there are lots of other folders but not the one mentioned in the error message.


 


But now this morning I am gettting the same erroe message I was getting last night .. "TargetingIdeaService.get Error: System.Net.WebException - Authentication failed because the remote party has closed the transport stream.


 


Another funny thing - I cannot get to google.com !!


 


I must have changed some settings ..when I try to go to google.com I get a SSL connection error ..

Expert:  Bryan replied 8 months ago.
hmmm ... sounds like we have other issues besides the dll issue. Ok, let's first reboot the computer, then just try to go to google.com.

If it works, great. Stop here and let me know. If it fails, uninstall the API, reboot and try again.

If it works, stop. If it fails, download, install and run Windows AIO Fixer. When you get to Step 5 in the Fixer, make sure that ALL checkboxes are checked. When it's all done, reboot and try again.

Let me know what happens.
Customer: replied 8 months ago.


Can make it to google.com now.


I did uninstall the APIs.


 

Expert:  Bryan replied 8 months ago.
Ok. So it sounds like the API may not have been installed completely. Try downloading it and saving it to a different directory (like C:\Users\HOMEPC-9\Downloads). Then install the API from there. That should clear up both the Google login problem as well as the missing DLL problem.
Customer: replied 8 months ago.


Still getting the error :"TargetingIdeaService.get Error: System.Net.WebException - Authentication failed because the remote party has closed the transport stream.

Customer: replied 8 months ago.


Still getting the error :"TargetingIdeaService.get Error: System.Net.WebException - Authentication failed because the remote party has closed the transport stream.


Customer: replied 8 months ago.


Looks like I am getting past those earlier erros - now it is complaining about an invalid_token_trigger - I could not find anything called "developer token" so I used what appeared to be the adWords account number or Customer ID ...where would I find the exact "developer token" ?


 

Expert:  Bryan replied 8 months ago.
You have to sign up for the token from here: https://developers.google.com/adwords/api/docs/signingup

Then, once Google approves it your developer token can be seen from your dashboard.
Customer: replied 8 months ago.

Bryan,


 


I am back at this problem again - have not been able to resolve it yet.


The google adwords approach is probably more comprehensive but I have not been able to setup the account and all that. It seems to be a longer route to solve my problem. I put in all the requests for the accounts etc. but have not got any response. I may have to walk through the instructions all over again and still wait another week to get a response from google. If ultimately that is what I need to do I will do that.


 


However, I have found something close enough on stackoverflow.com that just needs a small modification. So here is your task :


 


1) Look at this code and walk me through steps to get this working as is. I am not an expert in Excel or VB but given some instructions can cut and paste some code and make it run if someone can walk me through. Last time I did programming was about 20 years ago.


 


2) Help me modify the google search portion where instead of searching the whole internet, I am searching in a particular website, which is named in say Column D (D1, D2, D3 etc.)


 


Let me know what the fee is and lets move on this.


 


============= Excerpt from stackoverflow.com===============


Access http://stackoverflow.com/questions/4763140/number-of-google-results-from-excel


=====================================================


 


Public Sub ExcelGoogleSearch()

Dim searchWords As String

With Sheets("Sheet1")
RowCount = 1
Do While .Range("A" & RowCount) <> ""
searchWords = .Range("A" & RowCount).Value

' Get keywords and validate by adding + for spaces between
searchWords = Replace$(searchWords, " ", "+")

' Obtain the source code for the Google-searchterm webpage
search_url = "http://www.google.com/search?hl=en&q=""" & searchWords & """&meta="""
Set search_http = CreateObject("MSXML2.XMLHTTP")
search_http.Open "GET", search_url, False
search_http.send
results_var = search_http.responsetext
Set search_http = Nothing

' Find the number of results and post to sheet
pos_1 = InStr(1, results_var, "resultStats>", vbTextCompare)

If pos_1 = 0 Then
NumberofResults = 0
Else
pos_2 = InStr(3 + pos_1, results_var, ">", vbTextCompare)
pos_3 = InStr(pos_2, results_var, "<nobr>", vbTextCompare)
NumberofResults = Mid(results_var, 1 + pos_2, (-1 + pos_3 - pos_2))
End If

Range("B" & RowCount) = NumberofResults
RowCount = RowCount + 1
Loop
End With
End Sub

Customer: replied 8 months ago.
Relist: Other.
I am working on a deadline and can work with anyone who is knowledgeable in this area and can help. I wish to get something accomplished this weekend / week.
Expert:  Bryan replied 8 months ago.
Hi Praveen. Can you give me a couple other url's that you are planning to search? Different search engines use different methods of searching for results do it's not really a simple search/replace. But, if you give me a couple other sites, I may be able to come up with another solution for you.
Customer: replied 8 months ago.

Some additional url's :


 


www.alcoa.com


www.hitchiner.com


www.aaaind.com


www.precast.com


 


However, I would prefer to stay with google search if possible.


- Praveen

Expert:  Bryan replied 8 months ago.
Ok. So let's just clarify things ... you want to use google.com to get the total number of times a certain word appears on any of the above sites. Is that right?

If so, then really the adwords code we first went over is the best solution. But I will take a look at this other code to see if it can be adapted.
Customer: replied 8 months ago.


Ok thanks I understand. I will check once again why my developer account has not been approved by Google yet. Only after that approval can I try the Adwords approach. Until then if you can make that code work that will be excellent.


 


- Praveen

Expert:  Bryan replied 8 months ago.
Ok, which column has the url to search, and which column has the word or phrase to search for?
Customer: replied 8 months ago.


I can be flexible about it, but lets go with


URL is in first column (A1, A2, A3 etc.),


word to search is in second column (B1, B2, B3 etc.),


and result count is posted in third column (C1, C2, C3 etc.)


- Praveen

Customer: replied 8 months ago.


Great. I have downloaded the code on my machine.


I will need some further instructuctions on how to import it into my VB environment in Excel and start using it as a Macro etc.


 


I can toggle between excel and the VB environment but beyond that do not know how to import this file and make it work.


 


- Praveen

Expert:  Bryan replied 8 months ago.
Ok, When do you want the code to run? We can make it run every time you move to a new row (that might be very CPU intensive) or when you select to run a macro.
Customer: replied 8 months ago.


For now we can set it up so that I get the data in place (say 20 websites in first column and one keyword along each website) and then select to run the macro - that would work.


 


Once I see how exactly it is working we may refine / optimize how it needs to work.


 


- Praveen


 

Expert:  Bryan replied 8 months ago.
Ok. And are you running Office 2010? Or another version?
Customer: replied 8 months ago.

Yes it is Office 2010.


- Praveen

Expert:  Bryan replied 8 months ago.
First thing, make a backup copy of your unchanged workbook! If something goes wrong we want to be able to come back to the starting state.

Ok great. First open the file that I sent in notepad. Hit Ctrl+A, then Ctrl+C

Now open Excel 2010. Open the spreadsheet with the url's we are working on. Hit Alt+F11 to open VBA.

Double-click on "Sheet1" on the left side. Hit Ctrl+V, then Ctrl+S. Click the "Save" button.

If you get an error about macro-free workbooks, click "No". Change the "Save as type" to "xlsm". Then click "Save" again. Overwrite if necessary.

Now switch back to Excel 2010. To run the macro (remember that it affects all rows that have data in the A column) hit Alt+F8, then select "Sheet1.ExcelGoogleSearch" and click the "Run" button.

Let me know how it goes.
Customer: replied 8 months ago.


I get a "permission to use object denied" error message from VB at the last step ("Run").


 


- Praveen

Expert:  Bryan replied 8 months ago.
Open VBA again (Alt+F11), right-click on the line "With Sheets("Sheet1")" and select "Toggle - Breakpoint". That will turn the line red. Now go back to Excel and run the macro. You will see either the error or you will see the code come up. If you see the code, tap F8 for each line of code. When you get the error, tell me which line you at when you get the error.
Customer: replied 8 months ago.

I get the error msg on Ln 20, Col1


 


- Praveen

Expert:  Bryan replied 8 months ago.
Ok. Right now it looks like that is being caused by Google refusing the request, possibly because it needs the API key. So, the good news is that once you have the API key that code should run through without any problems. The bad news is that you still need to jump on them about getting that key.
Customer: replied 8 months ago.

OK thanks, I will pursue the google API key.


- Praveen

Expert:  Bryan replied 8 months ago.
Sounds good. Let me know when you get it and I will help you integrate it into the code, if you need help.

JustAnswer in the News:

 
 
 
Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.
 
 
 

What Customers are Saying:

 
 
 
  • My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed. One Happy Customer New York
< Last | Next >
  • My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed. One Happy Customer New York
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
  • This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!! Alex Los Angeles, CA
  • Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult. GP Hesperia, CA
  • I couldn't be more satisfied! This is the site I will always come to when I need a second opinion. Justin Kernersville, NC
  • Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around. Esther Woodstock, NY
  • Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know. Robin Elkton, Maryland
 
 
 

Meet The Experts:

 
 
 
  • jstinehelfer

    Information Systems Manager

    Satisfied Customers:

    36
    A+ Comptia Certified computer repair
< Last | Next >
  • http://ww2.justanswer.com/uploads/JS/jstinehelfer/2012-6-6_215146_Pictureofme1.64x64.png jstinehelfer's Avatar

    jstinehelfer

    Information Systems Manager

    Satisfied Customers:

    36
    A+ Comptia Certified computer repair
  • http://ww2.justanswer.com/uploads/JA/JasonJames122/2011-12-16_135647_jasonjamesheadshotweb.64x64.jpg JasonJames122's Avatar

    JasonJames122

    Computer Enthusiast

    Satisfied Customers:

    0
    I manage all information systems (network of Windows PC's and servers with Microsoft Office products) for a small business
  • http://ww2.justanswer.com/uploads/JE/jessmagz/2012-6-6_18129_jm.64x64.jpg Jess M.'s Avatar

    Jess M.

    Computer Support Specialist

    Satisfied Customers:

    301
    Computer Software Specialist for more than 10 years
  • http://ww2.justanswer.com/uploads/CH/chutz747/2011-11-6_14231_me.64x64.jpg The-PC-Guy's Avatar

    The-PC-Guy

    Computer Manager

    Satisfied Customers:

    274
    20 years experience providing remote computer support
  • http://ww2.justanswer.com/uploads/SP/spherrod/2012-6-6_174244_1000852.64x64.JPG Steve Herrod's Avatar

    Steve Herrod

    Computer Support Specialist

    Satisfied Customers:

    125
    Trained in Microsoft Office from 2000 through to latest version 2010.
  • http://ww2.justanswer.com/uploads/SE/Seashore2011/2011-12-6_33418_111205223015.64x64.jpg Chris L.'s Avatar

    Chris L.

    Support Specialist

    Satisfied Customers:

    124
    Certified Expert with over 10 years experience.
  • http://ww2.justanswer.com/uploads/KR/krkljatorm/2012-6-24_153417_ITMiro.64x64.jpg IT Miro's Avatar

    IT Miro

    Computer Scientist

    Satisfied Customers:

    97
    Bachelor's Degree in Information Technology, Microsoft Certified Professional