---
title: "How to format cells through code in Google Sheets"
author: "Sourabh Choraria"
date: 2020-04-30T15:47:36+00:00
canonical_url: https://pulse.appsscript.info/p/2020/04/how-to-format-cells-through-code-in-google-sheets/
markdown_url: https://pulse.appsscript.info/p/2020/04/how-to-format-cells-through-code-in-google-sheets.md
categories:
  - "Sheets"
  - "Solutions"
tags:
  - "@magnemg"
  - "magne"
  - "Medium"
featured_image: https://pulse.appsscript.info/files/2020/04/1WVT3XHAs0k2i5lNaq8S8xQ.jpeg
description: "If you had used the GUI to manage your custom formulas used for conditional formatting, then to see and manage that logic, you would have to find and select the correct cell, or select the..."
---

# How to format cells through code in Google Sheets

![How to format cells through code in Google Sheets](https://pulse.appsscript.info/files/2020/04/1WVT3XHAs0k2i5lNaq8S8xQ.jpeg)

[![](https://pulse.appsscript.info/files/2020/04/1WVT3XHAs0k2i5lNaq8S8xQ.jpeg)](https://medium.com/@magne/how-to-format-cells-through-code-in-google-sheets-9d727ecc6053)

> If you had used the GUI to manage your custom formulas used for conditional formatting, then to see and manage that logic, you would have to find and select the correct cell, or select the entire spreadsheet, and then right click and select “Conditional Formatting”, or go to the menu and select “Format -> Conditional Formatting”, to actually see and edit that logic. Which can be quite inconvenient at times.

Set conditional formatting rules through your script, which would allow you to keep everything configured in a single script.

Source: *[How to format cells through code in Google Sheets*](https://medium.com/@magne/how-to-format-cells-through-code-in-google-sheets-9d727ecc6053)

---

*Published by [Sourabh Choraria](https://pulse.appsscript.info/p/author/scriptgs/) on [Pulse](https://pulse.appsscript.info/). Original article: [https://pulse.appsscript.info/p/2020/04/how-to-format-cells-through-code-in-google-sheets/](https://pulse.appsscript.info/p/2020/04/how-to-format-cells-through-code-in-google-sheets/)*
