+ Reply to Thread
Results 1 to 3 of 3

Query returning no results when data is there (Problem is at c = ...)

  1. #1
    Registered User
    Join Date
    07-02-2017
    Location
    Tukwila WA
    MS-Off Ver
    Google Docs
    Posts
    3

    Query returning no results when data is there (Problem is at c = ...)

    Hello,
    I'm writing up a little Google Doc that deals with heroes from Heroes of the Storm. Just something simple to make me remember build paths until I get more use to the game. I am having troubles with one of my query searches as i'm trying to make the program more dynamic. My code is this:

    =QUERY($A$1:$E$25, "Select D Where B = '"&'Hero Builds'!A1&"' AND C = '"&C1&"'")

    My problem is C = '"&C1&"'" part. If i put C = 1 then it works fine and shows me the list of Talents at level 1 but it returns #N/A telling me that the query finished and had 0 results. If tried referencing the page itself and changing the format of C along with a few other issues but I still cannot figure out why my result is giving me back no results.

    I have also made another page and typed in 1, then did the query search below the 1 where it referenced my written 1 and I still get the same problem back.
    Last edited by cbogner; 07-05-2017 at 04:37 PM.

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Query returning no results when data is there (Problem is at c = ...)

    Hi,

    It is difficult to help specifically without the workbook but perhaps you merely need to add the sheet reference as with the other criterion
    =QUERY($A$1:$E$25, "Select D Where B = '"&'Hero Builds'!A1&"' AND C = '"&'Hero Builds'!C1&"'")

    It may also be that you need to omit the apostrophes for a numeric value thus
    =QUERY($A$1:$E$25, "Select D Where B = '"&'Hero Builds'!A1&"' AND C = "&'Hero Builds'!C1)
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Registered User
    Join Date
    07-02-2017
    Location
    Tukwila WA
    MS-Off Ver
    Google Docs
    Posts
    3

    Re: Query returning no results when data is there (Problem is at c = ...)

    Removing the single quotes did work, thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Problem with a simple Index Match formula returning inconsistent results
    By SueBristow in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-20-2017, 06:44 AM
  2. MS Query not returning all data to Excel
    By kenny.fsw in forum Access Tables & Databases
    Replies: 1
    Last Post: 07-21-2015, 11:40 PM
  3. Microsoft Query Returning Blank Cells/Results
    By skull132 in forum Excel General
    Replies: 2
    Last Post: 07-11-2014, 04:26 AM
  4. [SOLVED] Access unmatched query returning Blank Results
    By jonboy6257 in forum Access Tables & Databases
    Replies: 4
    Last Post: 12-04-2013, 10:46 AM
  5. [SOLVED] SQL Query not returning correct results
    By Stephen in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-20-2006, 08:25 AM
  6. [SOLVED] Incorrect syntax near '#' problem when returning to MS Query fromExcel
    By Steen Persson (DK) in forum Excel General
    Replies: 0
    Last Post: 03-07-2006, 11:30 AM
  7. Incorrect syntax near '#' problem when returning to MS Query fromExcel
    By Steen Persson (DK) in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-07-2006, 11:30 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1