Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3212588
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T14:51:12+00:00 2026-05-17T14:51:12+00:00

I have a Google spreadsheet where I keep a list of bugs and whenever

  • 0

I have a Google spreadsheet where I keep a list of bugs and whenever I fix a bug I change the status from “Not Started” to “Complete”. I want to write a script for the Google Docs spreadsheet such that whenever I change the status to “Complete” the entire row gets highlighted in a certain color.

I already know that Google spreadsheet already has “change color on text” but that function only changes the color of the cell and does not change the color of the entire row.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T14:51:13+00:00Added an answer on May 17, 2026 at 2:51 pm
    //Sets the row color depending on the value in the "Status" column.
    function setRowColors() {
      var range = SpreadsheetApp.getActiveSheet().getDataRange();
      var statusColumnOffset = getStatusColumnOffset();
    
      for (var i = range.getRow(); i < range.getLastRow(); i++) {
        rowRange = range.offset(i, 0, 1);
        status = rowRange.offset(0, statusColumnOffset).getValue();
        if (status == 'Completed') {
          rowRange.setBackgroundColor("#99CC99");
        } else if (status == 'In Progress') {
          rowRange.setBackgroundColor("#FFDD88");    
        } else if (status == 'Not Started') {
          rowRange.setBackgroundColor("#CC6666");          
        }
      }
    }
    
    //Returns the offset value of the column titled "Status"
    //(eg, if the 7th column is labeled "Status", this function returns 6)
    function getStatusColumnOffset() {
      lastColumn = SpreadsheetApp.getActiveSheet().getLastColumn();
      var range = SpreadsheetApp.getActiveSheet().getRange(1,1,1,lastColumn);
    
      for (var i = 0; i < range.getLastColumn(); i++) {
        if (range.offset(0, i, 1, 1).getValue() == "Status") {
          return i;
        } 
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following data being generated from a google spreadsheet rss feed. いきます,go,5
Does Google have an API for registering hooks/callbacks for whenever a document is updated?
I have a Google Spreadsheet with 3 columns that are either blank or have
I have a google spreadsheet that uses this function: =SUM(E:E) - SUM(C:C) It adds
I would like to create a HLOOKUP in google doc spreadsheet: =HLOOKUP(aValue;DEC10!$D$2:$W$3;2;FALSE) I have
I have a spreadsheet (in Google Docs, but can be any spreadsheet) with a
How can you add images to a Google Document (not Spreadsheet or Presentation) via
I'm new to Google Documents and have set up a spreadsheet that accesses the
I have a google spreadsheet with multiple columns that have variable row counts in
I have a Google Docs spreadsheet with a few columns. In column D I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.