Peppo
Peppo

Reputation: 1

Create a border around a range if the date in a certain cell is the same as today

I'm using Google Sheets. My ultimate goal is to create a border around a variable range 'B', if the date in a certain cell, within a range 'A', is the same as "today".

For example:

The table below illustrates it:

So if today is Jan 17 and E3 matches it, then select range E2:E9 and add a border around it.

If G3 matches, then select range G2:G5 and add a border around it

A B C D E F G
SEGUNDA TERÇA QUARTA QUINTA SEXTA SÁBADO DOMINGO
Jan 13 2025 Jan 14 2025 Jan 15 2025 Jan 16 2025 Jan 17 2025 Jan 18 2025 Jan 19 2025
Tamo Junto 204 Minuto do Guerreiro REPRISE Minuto do Guerreiro REPRISE
Entendendo Bíblia 1076 Entendendo Bíblia 1077 Entendendo Bíblia 1078 Entendendo Bíblia 1079 Entendendo Bíblia 1080 Hora da Irmandade
Caráter Primeiro 175 De Pai Para Filha 159 Caráter Primeiro 176 Caráter Primeiro 180 & 181
Palavra e Viola 523 VTD 95 Mais Uma Verdade 84 Palavra e Viola REPRISE
Auto Estima 87 Rio 93Fm 20/01 - 24/01 Descubra Lugares REPRISE
Missão Noticia REPRISE No Ponto REPRISE

This is a simplified copy of my spreadsheet: Test Sheet

I tried mashing up various formulas for creating automatic borders, selecting a variable range automatically, locating a specific cell in a particular range and a bunch of other things (although I don't remember the exact functions or formulas I used) but nothing worked.
From what I remember I tried Arrays, lastRow, Query, and many other things.

Since I don't have much knowledge in programming I am kind of in the dark.

The only thing I was successful was changing the color of the cell if the date is today using Conditional Formatting in Google Sheets. The only problem is that it doesn't allow me to create a border based on a cell.
I saw some people talking about importing and Excel spreadsheet with the border formatting to Google Sheets, but for my case it wouldn't work long term, for I am updating the ss basically every week.

Is it possible to do this??

Upvotes: 0

Views: 90

Answers (0)

Related Questions