Is there a way to write a formula to do a lookup in another sheet to see if a cell is bolded?
Additional context:I am creating a fantasy football schedule. I'm trying to write either "vs" or "@" in a cell based on whether the indicated team is Home or Away. Another sheet indicates who is home or away via bolding the opponent's "team number" (i.e. Team 1 plays Team 10, etc.). Here's an abbreviated example of the sheet that has the data I believe I need and another of the schedule how I want it to look.
| Team Number | Team Code | Week 1 | Week 2 |
|---|---|---|---|
| 1 | ME | 2 | 2 |
| 2 | B13 | 1 | 1 |
| Week | Team Name | Code | VS/@ | Team Name | Team Code |
|---|---|---|---|---|---|
| 1 | Macksimum Effort | ME | vs | B13 Boyz | B13 |
| 1 | B13 Boyz | B13 | @ | Macksimum Effort | ME |
| 2 | Macksimum Effort | ME | @ | B13 Boyz | B13 |
| 2 | B13 Boyz | B13 | vs | Macksimum Effort | ME |
I feel like there should be a way for me to use the Team Code to do a lookup based on the week value and check if the cell is bolded. If it is, I want to print in the "VS/@" column an "@" and if it isn't, I want to print a "VS". Is this possible? I can't seem to figure out the logical expression. I'm willing to write a script as well as I only need to run this once a year, but I'm not very well versed in how to set that up for this when I think a VLOOKUP is necessary.
function ifBold(a1Notation) {var cell = SpreadsheetApp.getActiveSpreadsheet().getRange(a1Notation);if(cell.getFontWeight() == 'bold') return true;return false;