none
How can I pull data with the & using MSQuery in Excel 2007? RRS feed

  • Question

  • I need to pull a company name that has the & in it, H&S. If I run my MSQuery so it only pull the Makes I want, H&S doesn't show. If I remove the Make criteria so it pulls everything, MSQuery returns all everything including H&S.

    I have my criteria field as Make,

    Vaule is In ('POTTINGER','UNVERFERTH','KNIGHT','H&S','POLARIS','KUHNS','KUHN','ARIENS','AHRENS')

    It will return everything except H&S

    Wednesday, October 29, 2014 6:36 PM

All replies

  • I need to pull a company name that has the & in it, H&S. If I run my MSQuery so it only pull the Makes I want, H&S doesn't show. If I remove the Make criteria so it pulls everything, MSQuery returns all everything including H&S.

    I have my criteria field as Make,

    Vaule is In ('POTTINGER','UNVERFERTH','KNIGHT','H&S','POLARIS','KUHNS','KUHN','ARIENS','AHRENS')

    It will return everything except H&S

    Interesting I could not replicate this in my test.

    What kind of Database are you query from? Also it might be that the "&" is not the actual "&" but a special character.

    Therefor when typing it up, it does not match. What you can do is copy the value out of the field and copy that in the criteria in order to see if that gives a match.

    Hope this helps,


    Daniel van den Berg | Washington, USA | "Anticipate the difficult by managing the easy"

    Please vote an answer helpful if they helped. Please mark an answer(s) as an answer when your question is being answered.

    Wednesday, October 29, 2014 7:46 PM
  • Hi JDeere1937,

    Did the suggestion provide by danishani fix this issue? If not, I suggest that you get more effective response from Excel IT Pro Discussions forum for end-user issues.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, November 6, 2014 10:15 AM
    Moderator
  • I have already tried that with no luck. I have even selected H&S through the Criteria wizard, which lists out all available manufacturers. No luck. My work around was exclude the Make filter in the query and just filtered everything after the data was pulling into the spreadsheet.
    Thursday, November 6, 2014 5:44 PM
  • I have already tried that with no luck. I have even selected H&S through the Criteria wizard, which lists out all available manufacturers. No luck. My work around was exclude the Make filter in the query and just filtered everything after the data was pulling into the spreadsheet.

    Did you tried with double "&", so the filter would be 'H&&S'?

    Not sure if that works, but maybe worth a try.

    Hope this helps,


    Daniel van den Berg | Washington, USA | "Anticipate the difficult by managing the easy"

    Please vote an answer helpful if they helped. Please mark an answer(s) as an answer when your question is being answered.

    Thursday, November 6, 2014 5:53 PM