Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm looking for a way to reference the sheet whose properties I'm in.
I have a calculated tab color as follows:
=if(GetActiveSheetId()='Document\SH02',rgb(141,198,63),rgb(0,157,220))
However, I'm getting sick of manually switching the sheet ID ('Document\SH02') on every sheet to make the tab color work properly - I can't set it as the document default, use it in a theme, etc. because it has to be done manually as far as I can tell.
Is there a way to reference "this sheet" so I could do something like:
=if(GetActiveSheetId()=GetThisSheetID(),rgb(141,198,63),rgb(0,157,220))
???
Thanks!
Hi Kent,
I don't know if I understood correctly but I will comment you some ideas.
If you are using the copy sheet option to duplicate a sheet, this function keep the same ID for two sheets so I normally create new sheets and then copy the objects to the new sheet; with this way the objects and sheets will have differents ID.
For work with the colors of the tabs, you can define same variables with RGB color codes and then use this variables from the sheets properties. You also can use other variable with numbers, and define one number for each sheet, then in each sheet you question if(vVariable = 1, vRGB1, vRGB2) for example, and the code is more reutilizable.
Regards.