multiple cell check and setvalue

kwdennis

New Member
Joined
Jun 6, 2019
Messages
15
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
      }
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

Forum statistics

Threads
1,223,992
Messages
6,175,823
Members
452,672
Latest member
missbanana

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top