• Skip to main content
  • Skip to primary sidebar

Ravi Shankar

Tweaking Apps

  • Swift
  • Tech Tips

Google Spreadsheet

How to limit results returned by Query function in Google Spreadsheet

September 5, 2011 By Ravi Shankar Leave a Comment

We had already seen brief introduction about using Query function in Google Spreadsheet. Let us see how to limit the number of rows returned using Query Function with the following sample data of batsman with maximum runs in test cricket.

Now if you want to get the top 3 batsman with maximum number of runs scored, then you can use

=QUERY(C3:G13,”select C,G limit 3″)

The limit keyword will reduce the number of results returned to 3.

But say if you want to get the list of top 3 batsman with maximum averages then need to use the Order by clause.

=QUERY(C3:G13,”select C,F order by F desc limit 3″)

The above query would first sort the list using Order by clause and then uses the limit keyword to get the Top results.

Filed Under: Excel, Technical Tagged With: Google Spreadsheet, Limit, Order by, Query, results

How to validate an email addresses in Google Spreadsheet

August 25, 2011 By Ravi Shankar Leave a Comment

In Google Spreadsheet you can check whether the value entered is a proper email address by creating a data validation rule. This rule does a simple validation and checks for the @ symbol in the entered value. Let us say you have a column in your spreadsheet that needs to accept only email addresses, then you can do the following to add the validation.

Select the Column values, click the Data menu and select Validation from the menu list.

In the Data Validation window, select Text, Contains for the Criteria drop down and specify the value as @

And if you want to display a message to the user then type the message in Help text some thing like “Enter proper email address example [email protected]”. Click on the Save button to save the changes.

Now when you enter a value in the email address column without the @ symbol then it would display the message as shown below.

Filed Under: Excel, Technical Tagged With: Contains, Data Validation, email address, Google Spreadsheet, Validate

Primary Sidebar

TwitterLinkedin

Recent Posts

  • How to set preferred Wifi network on Mac
  • Attribute Unavailable: Estimated section warning before iOS 11.0
  • How to recover Firefox password from Time Machine backup
  • Show hidden files and folders on Mac
  • How to request a refund for apps in App Store

Pages

  • About
  • Privacy Policy
  • Terms and Conditions

Copyright 2022 © rshankar.com

Terms and Conditions - Privacy Policy