Code:
// Set the options based on account type automatcially and save those settings for reloading data
// if your account is VIP options will default to VIP you can then manually set to Yes to show ownership
// these settings will be saved if you drop to Premium and back to VIP
// have multiple cells to check would like to add an array type check if possible
// just started using google sheets for this
// any help would be apprecitated with setting up some type of multi cell check setvalue
var AccountType = myDashboard.getRange("Q15").getValue(); // checking the account type value to set the ownership default settings
if( AccountType === "VIP" )
{
if( myDashboard.getRange("G23") === "Yes" && myDashboard.getRange("G23") === "VIP" ) // check cell for values
{
// leave the setting alone
}
if ( myDashboard.getRange("G23").isBlank() === true ) // check if the setting is blank
{
myDashboard.getRange("G23").setValue("VIP"); // set the default value here based on account type
}
}
if( AccountType === "Premium" && myDashboard.getRange("G23") === "Yes" ) // check cell for values
{
// leave the setting alone
}
if ( myDashboard.getRange("G23").isBlank() === true ) // check if the setting is blank
{
myDashboard.getRange("G23").setValue("No"); // set the default value here based on account type
}
if( AccountType === "Free to Play" && myDashboard.getRange("G23") === "Yes" ) // check cell for values
{
// leave the setting alone
}
if ( myDashboard.getRange("G23").isBlank() === true ) // check if the setting is blank
{
myDashboard.getRange("G23").setValue("No"); // set the default value here based on account type
}