Apr 16 2023 09:21 AM
I am aware that you can reference other sheets in a function, but how do you reference the current sheet in one?
IF(Current_sheet_name="user template", value_if_true, value_if_false)
Thanks!
Apr 17 2023 12:38 AM
You can use the CELL function to reference the current sheet name in an Excel function.
Here’s how:
I hope this helps!
Apr 17 2023 12:40 AM
Solution
(the workbook must be saved)
If you run Excel 365:
=IF(TEXTAFTER(CELL("filename",A1),"]") = "user template", value_if_true, value_if_false)
with other versions:
=IF(RIGHT(CELL("filename",A1),LEN(CELL("filename",A1))-SEARCH("]",CELL("filename",A1))) = "user template", value_if_true, value_if_false)