+ Reply to Thread
Results 1 to 3 of 3

Google Sheets | Reference in Quotation Marks

  1. #1
    Registered User
    Join Date
    02-10-2022
    Location
    Istanbul
    MS-Off Ver
    365
    Posts
    5

    Google Sheets | Reference in Quotation Marks

    Hi All,

    I am trying to use a cell reference within a quotation marks but it returns nothing.

    My formula is =QUERY(Monthly_Merged1!W1:AA,"select * where W = 2")

    The 2 in the formula refers to the month number of the previous month. That's why, I use the following formula to return "2" in a cell (G1): =text(MONTH(EOMONTH(TODAY(),-2)+1),"0")

    When I re-write my formula, it becomes =QUERY(Monthly_Merged1!W1:AA,"select * where W = """&G1&"""") but this returns nothing, a screenshot in the attachment.

    Is there any suggestion how I can fix this?
    Attached Images Attached Images
    Last edited by 6StringJazzer; 03-29-2022 at 07:29 AM. Reason: Moved from Excel Formulas & Functions

  2. #2
    Valued Forum Contributor janmorris's Avatar
    Join Date
    07-24-2021
    Location
    Japan
    MS-Off Ver
    Google Sheets (& Mac 2021)
    Posts
    1,066

    Re: Google Sheets | Reference in Quotation Marks

    You don't need so many double quotations.. just enough to open and close and include things inside the SQL query instruction.

    So, your formula should be:
    Please Login or Register  to view this content.
    Last edited by janmorris; 03-29-2022 at 01:38 PM.
    As a gesture off appreciation, you can click * Add Reputation at the foot of any of the posts of members who helped you reach a solution.

    And finally, was your problem solved? if so, please click Thread Tools above the first post of your enquiry, then select [Solved]

  3. #3
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,147

    Re: Google Sheets | Reference in Quotation Marks

    The Query formula to be used can be more simplified to;

    Please Login or Register  to view this content.
    and, the formula in G1;

    Please Login or Register  to view this content.

    BTW;

    Without using the formula in G1, these 2 formulas can be inserted in the Query formula as;


    Please Login or Register  to view this content.
    Attached Images Attached Images
    Last edited by Haluk; 03-30-2022 at 02:42 AM.

+ 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. Quotation Marks within Quotation Marks
    By benjhardie in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-12-2019, 03:28 AM
  2. Quotation Marks Getting in the Way
    By Vladamir in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-12-2012, 06:50 PM
  3. Quotation Marks?
    By LinearChaos in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-25-2006, 05:37 PM
  4. [SOLVED] without quotation marks?
    By jfazz in forum Excel General
    Replies: 1
    Last Post: 03-02-2006, 12:45 PM
  5. Quotation Marks - When and What??
    By heski in forum Excel General
    Replies: 2
    Last Post: 02-07-2006, 08:45 AM
  6. quotation marks
    By JohnF in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-05-2006, 05:35 PM
  7. quotation marks
    By Hippy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-04-2005, 07:10 PM

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