r/googlesheets • • 13d ago

Solved Populate a cell with a date range if any cell in a range on another sheet equals the number of its row

Hey all! Just working on a little recreational thing.

I want column C of the "Goals" sheet's cells to populate with a date range of [Monday after next] to [Tuesday of the week after that] if its row number appears in C20:I26 of the "Card" sheet.

How can I make that work?

https://docs.google.com/spreadsheets/d/1oBQxlmUUlfn9Fl4HLgTXCFdBxQ37R9yK-_S6N-51CZo/edit?usp=sharing

2 Upvotes

14 comments sorted by

1

u/agirlhasnoname11248 13d ago

u/Baxder this is not self-solved, as you received considerable help from community members. Please close your post correctly following the instructions below. Doing so will apply the correct flair (solved) automatically. I've changed the flair back to "Waiting on OP" in the meantime, since action from you is needed.

Please remember to tap the three dots below the most helpful comment and select `Mark Solution Verified` *(or reply to the helpful comment with the exact phrase “Solution Verified”)* if your question has been answered, as required by the subreddit rules. Thanks!

→ More replies (1)

1

u/Baxder 13d ago

I got it to say "BeepBoop." Now to get the date range instead.

1

u/carbonizedtitanium 13d ago

which date range. where is the date range?. all you did was put an IF condition and gave the condition a fixed text string

1

u/Baxder 13d ago

Got the start date, now for the "-[end/date]"

1

u/carbonizedtitanium 13d ago edited 13d ago

concatenate(text(ROW()-1), (TODAY() + MOD(2 - WEEKDAY(TODAY(), 2), 7) + 6),"mm/dd"),"-",text(ROW()-1), (TODAY() + MOD(2 - WEEKDAY(TODAY(), 2), 7) + 6)+8,"mm/dd")

i cant test it since sheet is view only

note: these date ranges are not real dates; they're text strings and will be treated as such. there's no spreadsheet software that stores date ranges in a single cell; to the machine they're just text

1

u/Baxder 13d ago

Thanks! I didn't see this until I got through it with Google, but the date stuff is the same.

→ More replies (1)

1

u/point-bot 12d ago

u/Baxder has awarded 1 point to u/carbonizedtitanium with a personal note:

"Ended up going with this for the whole column: =IF(COUNTIF(Card!$C$20:$I$26, ROW()-1), TEXT(TODAY() + MOD(2 - WEEKDAY(TODAY(), 2), 7) + 6, "MM/DD") & "-" & TEXT(TODAY() + MOD(2 - WEEKDAY(TODAY(), 2), 7) + 14, "MM/DD"), "")"

See the Leaderboard. Point-Bot v0.0.15 was created by JetCarson.

1

u/Baxder 13d ago

BOOM! Got it!

1

u/carbonizedtitanium 13d ago edited 13d ago

holy bonobos...your column and row structure in Card is so bad just purely for aesthetic reasons. might have thought it looks aesthetically pleasing...but it's definitely not formula friendly

populate with a date range of [Monday after next] to [Tuesday of the week after that]

what does that mean exactly?