+ Reply to Thread
Results 1 to 10 of 10

Google Sheets Query IF column problem Converted to Excel Function?

  1. #1
    Registered User
    Join Date
    11-23-2014
    Location
    USA
    MS-Off Ver
    2013
    Posts
    4

    Google Sheets Query IF column problem Converted to Excel Function?

    Use Google sheets and am converting to excel. I have a schedule, and trying to come up with an automated way to create a list of everyone working that day and sort them by time. I have some people scheduled at various times.

    Name Monday Tuesday
    Bob 10 9
    Randy 7 9
    Robert
    Jim 9
    Jimmy 9
    James 9 10

    Currently in Google Sheets, I use =query(A1:F12,"select A,B where B=7 or B=9 or B=10 order by B")

    Essentially I query the whole schedule then select column A and B, A for the name and B day of the week where the value in column B = 7,9,10 the shift they work and then create the list in order by B. The Google gives me this but can't find a way in excel.

    Name Monday
    Randy 7
    Jim 9
    James 9
    Bob 10

  2. #2
    Registered User
    Join Date
    11-23-2014
    Location
    USA
    MS-Off Ver
    2013
    Posts
    4

    Re: Google Sheets Query Converted to Excel Function?

    Still having trouble, anyone have any tips?

  3. #3
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Google Sheets Query Converted to Excel Function?

    In G2 of the attached file I entered this non-array formula and filled down to G7:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Then in F2 entered this array formula (must be committed with Ctrl + Shift + Enter) and filled down to F7:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Does this do what you want?
    Attached Files Attached Files
    Last edited by FlameRetired; 11-25-2014 at 01:01 AM.

  4. #4
    Registered User
    Join Date
    11-23-2014
    Location
    USA
    MS-Off Ver
    2013
    Posts
    4

    Re: Google Sheets Query Converted to Excel Function?

    It appears to be pretty close. The results seem to output the desired information. The only thing is that the data resulted in F6 and F7 shows individuals not scheduled to work. With google, if the person doesn't have a value of 7,9,10 then it doesn't look to the coresponding column or present data.

    Seems like you've essentially used two forumulas to present the data. The first one, I'm trying to understand what it's doing.

    The first part, "=IFERROR(SMALL($B$2:$B$7,ROWS($1:1)),"")"

    Looks like it's looking in B2 to B7, but I'm not sure what SMALL and ROWs and the 1:1 represent? Looks like it's findinging all the values in the defined area and returning them in order, not sure what the IFERROR is?

    =INDEX($A$2:$A$7,SMALL(IF(G2=$B$2:$B$7,ROW($A$2:$A$7)-MIN(ROW($A$2:$A$7))+1),COUNTIF($G$2:G2,G2)))

    So, "=INDEX($A$2:$A$7" this part defines the area that is being indexed?

    I'm having a hard time understanding what the rest of it does, or how it interacts with what was put in G2?
    Last edited by Garthilk; 11-25-2014 at 04:33 PM.

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Google Sheets Query Converted to Excel Function?

    From Post 1:
    Essentially I query the whole schedule then select column A and B, A for the name and B day of the week where the value in column B = 7,9,10 the shift they work and then create the list in order by B. The Google gives me this but can't find a way in excel.
    From Post 4:
    Looks like it's looking in B2 to B7, but I'm not sure what SMALL and ROWs and the 1:1 represent? Looks like it's findinging all the values in the defined area and returning them in order, not sure what the IFERROR is?
    Column G sorts the list in order (7, 9, 10). It uses the SMALL function and sorts using the ROWS function to designate which smallest to list next. ROWS reports a row count as you copy the formula down yielding the 1st, 2nd, 3rd.......smallest numbers in the list. The IFERROR((<formula>),"") part suppresses errors that occur because the formula is entered over 6 rows (because there are 6 individuals in column A) with only 4 values (from column A) to return. Without the IFERROR the results would look like this:

    Row\Col
    E
    F
    G
    H
    I
    1
    Name Monday Tuesday
    2
    Randy
    7
    3
    Jim
    9
    4
    James
    9
    5
    Bob
    10
    6
    #NUM!
    #NUM!
    7
    #NUM!
    #NUM!
    8


    From Post 4:

    So, "=INDEX($A$2:$A$7" this part defines the area that is being indexed?
    Yes, and associates those names with their respective times (listed in sort order) and returns them in column F.

    This is the way I interpreted your request. Did I misinterpret?

    Edit: Would you like a reworked set of formulas that filter out the individuals not working?
    Last edited by FlameRetired; 11-26-2014 at 08:08 PM.

  6. #6
    Registered User
    Join Date
    11-23-2014
    Location
    USA
    MS-Off Ver
    2013
    Posts
    4

    Re: Google Sheets Query Converted to Excel Function?

    Quote Originally Posted by FlameRetired View Post
    Edit: Would you like a reworked set of formulas that filter out the individuals not working?
    Yes please.

    I have to stay I'm quite impressed by your ability to discern the request and then translate this into excel language. In sheets it was easy for me, but I feel like I'm coming to a different country (excel country). Thanks again.

  7. #7
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Google Sheets Query Converted to Excel Function?

    Quote Originally Posted by Garthilk View Post
    Yes please.........
    The attached filters out those individuals.
    Attached Files Attached Files
    Last edited by FlameRetired; 11-28-2014 at 07:33 PM.

  8. #8
    Registered User
    Join Date
    07-23-2015
    Location
    New York, USA
    MS-Off Ver
    Office 2011
    Posts
    10

    Re: Google Sheets Query Converted to Excel Function?

    Hi,

    I have a similar problem and was wondering if anyone could help. I have a Google sheet document that is using Query, but I need to do it in Excel (or would rather do it in Excel) and for the life of me can't figure out why (there are many reasons I don't want it to stay in Google Sheet, but won't get into it). I tried exporting the document to Excel format, but because it uses query, it obviously doesn't work correctly.

    Screen Shot 2015-07-24 at 8.46.41 AM.png
    Screen Shot 2015-07-24 at 8.48.27 AM.png

    I didn't create the original google document, which not relevant. What is relevant is what I want it to do. The sheet label All has information for Lighting Cues and follow spot cues together. The other sheets label Spots pull ONLY the information relevant to them including lighting cue number, who they are picking up what color etc. How can I recreate this in Excel without having to copy and paste the formula multiple times??? In the google document, the formula is listed only once and populates all the information for the Spot sheets.

    This is the formula from the original Google document
    Please Login or Register  to view this content.
    and was placed in the cell B3.

    Is all this making sense?

    Thanks for any assistance.

    Quote Originally Posted by FlameRetired View Post
    The attached filters out those individuals.

  9. #9
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Google Sheets Query IF column problem Converted to Excel Function?

    Greetings playmate and welcome to the Forum.

    As a newcomer you may not be aware of some Forum rules. It will help you to resolve your question sooner. Please acquaint yourself here:

    http://www.excelforum.com/forum-rule...rum-rules.html

    One would be to not post your question in the thread of another. You need to start your own thread.

    Another is simply good advice and that would be to post an actual Excel spreadsheet file in the Forum and not pics.
    Many of us cannot read them (me for example) and it saves having to retype your data. Also please post directly to the
    Forum. Posting to third party sites makes some of us nervous (me for example ) about clicking on unknown links.

    Thanks,

    Looking forward to your new thread.

    P.S. If you are unfamiliar with how to start a new thread click on any of the sub-Forums. You'll see a "Post New Thread" button in the upper-left corner.
    Dave

  10. #10
    Registered User
    Join Date
    07-23-2015
    Location
    New York, USA
    MS-Off Ver
    Office 2011
    Posts
    10

    Re: Google Sheets Query IF column problem Converted to Excel Function?

    Thank you for the advice.

+ 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. Import function in Google Sheets
    By Bielbo in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 1
    Last Post: 10-27-2014, 06:15 AM
  2. need 'continue' function. how to update to new google sheets?
    By eusair in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 0
    Last Post: 10-15-2014, 11:36 PM
  3. Convert from text to column and paste the converted data in other sheets
    By aakhan2011 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-19-2014, 03:05 AM
  4. [SOLVED] Modifying a Lat/Long function to extract ID and Reference from a Google Place query
    By Eagle29 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-26-2013, 05:51 AM
  5. Query function from google docs in excel 2011, anyone with a solution?
    By emilero in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 11-12-2012, 04:04 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