• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Digital Answers

How to tech tutorials in simple words

  • Home
  • About Us
  • Disclaimer
  • Privacy Policy

Archives for August 2011

Always Keep headings visible in Google Spreadsheet

August 24, 2011 by Admin 1 Comment

When you are working with lot of data in a Spreadsheet, the headings would disappear when you start scrolling down the rows. Google Docs Spreadsheet provides users with the option for keeping the headings always visible even when you scroll down the Sheet. This can be done by using the menu option available as part of the View menu. To explain, let us take the take following sample data

Now when the users scroll down below Row no 26, the heading rows would disappear as shown below.

And it will be difficult for the users to find out the column under which the values fall. This problem can be addressed using the Freeze rows feature. Navigate to View menu then Freeze rows and select Freeze 1 row menu option.

This would always Keep the heading rows always visible in a Google Docs Spreadsheet.

Filed Under: Excel, Technical Tagged With: Freeze rows, Google Docs, Headings, Rows, spreadsheet, Visible

How to enable autocomplete in Google Docs Spreadsheet

August 24, 2011 by Admin 5 Comments

Autocomplete feature helps users by automatically filling the content of cell when users starting entering the first couple of letters in the Cell. The automatic entry is picked from the previously entered values for the same column.

Let us say you have got the following list of entries in one of the column

Arizona
Alabama
California
Florida
Indiana

Now when you start typing Ar in the cell below Indiana, Spreadsheet will automatically display Arizona based on the entries done earlier for that column. And when you press enter this value will be automatically filled for that cell.

You can enable Autocomplete feature in Google Spreadsheet by clicking the Tools menu and selecting Enable AutoComplete from list of available menus.

Remember that if there is a empty cell before the active cell then Autocomplete feature will try to pick from the below column values.

Filed Under: Excel, Technical Tagged With: Autocomplete, Enable, Google, Google Docs, spreadsheet

Change alternate row background colors in Spreadsheet using Google Apps Script

August 22, 2011 by Admin 8 Comments

Here is a Google Apps Script that would set the background color of alternate rows in Google Spreadsheet. This script would set the background color of of the selection, this may not be an efficient script but would do the job.

Let us take the following sample data which will be used by the script for setting the background color.

Install the below script and select the data by excluding the Header columns and execute the script.

function alternateColor() {
  var totalRows = SpreadsheetApp.getActiveRange().getNumRows();
  var totalColumns = SpreadsheetApp.getActiveRange().getNumColumns();
  var startRow = SpreadsheetApp.getActiveRange().getRow();
  var startColumn = SpreadsheetApp.getActiveRange().getColumn();
  var sheet = SpreadsheetApp.getActiveSheet();
  var row = startRow;
  while (row < totalRows+startRow)
  {
    var column = startColumn
    while (column < totalColumns+startColumn){
      if(row%2 == 0){
           sheet.getRange(row, column).setBackgroundColor(“lightgrey”);
      }
      column++;
  }
    row++;
  }
}

After executing the script, the sample data would look as shown below.

If you want to change the white color then you can add an else statement to set the background color for odd row numbers as well.

if(row%2 == 0){
           sheet.getRange(row, column).setBackgroundColor(“lightgrey”);
      } else {
          sheet.getRange(row, column).setBackgroundColor(“lightblue”);
}

Let me know if any one have a better suggestionn.

Filed Under: Excel, Technical Tagged With: Alternate rows, Google Apps Script, spreadsheet

Primary Sidebar

Recent Posts

  • A Guide to Using the MAX and MIN Functions in Excel
  • How to display fractions in Excel
  • How to Separate a Person’s First and Last Name in Excel
  • How to Verify Email Addresses in Google Sheets: A Step-by-Step Guide
  • How to increase number of worksheets Excel

blogmines.com Copyright © 2023