+ Reply to Thread
Results 1 to 2 of 2

gsheet, If then else and query function

  1. #1
    Registered User
    Join Date
    03-20-2014
    Location
    UAE
    MS-Off Ver
    Office 2010
    Posts
    3

    gsheet, If then else and query function

    Hello!
    Please help me with the following google sheet function.

    Basically, the query is pulling data from sheet "Consolidate" where in it match the name and date and then give results in certain cells. What I want is that if the Cell, I3 is having letter A, Cell B3 (where in the actually query resides) should give me "Absent". If Cell I3 is filled with letter O then Cell B3 should give me "OFF", but if nothing is filled then it should move and run the query to find data from sheet "Consolidate"


    =IFS(I3 = "A", "ABSENT" , I3 = "O", "OFF", I3 = "","QUERY(Consolidate!$A:$I, "Select C,D,E,F,G,H,I where A = '"&B:B&"' AND B=date '"&TEXT(C1,"yyyy-mm-dd")&"'",0),"")")

    With the above function, I am either getting and error or no data results. I have attached a screen shot of the sheet also for better understanding.
    Attached Images Attached Images

  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: gsheet, If then else and query function

    The typed formula is not the same as the image formula.

    So this is a wild guess, try this formula:

    Please Login or Register  to view this content.
    If that does not work, then try building a sample in this file:

    https://docs.google.com/spreadsheets...gid=2100307022
    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]

+ 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. Power query Custom function / parameter query
    By Dicken in forum Office 365
    Replies: 0
    Last Post: 03-23-2022, 10:41 AM
  2. Excel Power Query Refresh or Access Query - 2nd Query Run is faster
    By Steveapa in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-03-2020, 10:16 AM
  3. [SOLVED] Power Query - Converting a query into a function
    By kersplash in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-29-2019, 12:17 AM
  4. [SOLVED] MID function and SQL Query
    By Soniya in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-29-2006, 07:30 AM
  5. [SOLVED] query about VALUE function
    By Harlan Grove in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2005, 02:05 PM
  6. [SOLVED] Function query
    By Rahul in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-25-2005, 01:05 PM
  7. Microsoft Query rejects "nz" function in Access Query
    By Vaughan in forum Excel General
    Replies: 0
    Last Post: 05-04-2005, 01:06 PM

Tags for this Thread

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