How can you find or highlight all cells having validation in Google Sheets?












1















My spreadsheet has several cells that have had validation applied to them, but it would be nice to recheck them or switch the validation to a complimentary cell. After searching on Google and looking through the web page's GUI, it was not obvious how all cells having validation could be found. Is there a way to highlight or list all cells that have had validation applied to them?










share|improve this question
















bumped to the homepage by Community 2 days ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.






migrated from superuser.com Jan 3 at 15:37


This question came from our site for computer enthusiasts and power users.



















  • there isnt any.

    – MARK MY ANSWER
    Jan 3 at 15:44
















1















My spreadsheet has several cells that have had validation applied to them, but it would be nice to recheck them or switch the validation to a complimentary cell. After searching on Google and looking through the web page's GUI, it was not obvious how all cells having validation could be found. Is there a way to highlight or list all cells that have had validation applied to them?










share|improve this question
















bumped to the homepage by Community 2 days ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.






migrated from superuser.com Jan 3 at 15:37


This question came from our site for computer enthusiasts and power users.



















  • there isnt any.

    – MARK MY ANSWER
    Jan 3 at 15:44














1












1








1








My spreadsheet has several cells that have had validation applied to them, but it would be nice to recheck them or switch the validation to a complimentary cell. After searching on Google and looking through the web page's GUI, it was not obvious how all cells having validation could be found. Is there a way to highlight or list all cells that have had validation applied to them?










share|improve this question
















My spreadsheet has several cells that have had validation applied to them, but it would be nice to recheck them or switch the validation to a complimentary cell. After searching on Google and looking through the web page's GUI, it was not obvious how all cells having validation could be found. Is there a way to highlight or list all cells that have had validation applied to them?







google-sheets search list google-sheets-data-validation






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 6 at 0:09









Rubén

27.6k636171




27.6k636171










asked Jan 3 at 15:36









Noctis SkytowerNoctis Skytower

1184




1184





bumped to the homepage by Community 2 days ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 2 days ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.






migrated from superuser.com Jan 3 at 15:37


This question came from our site for computer enthusiasts and power users.









migrated from superuser.com Jan 3 at 15:37


This question came from our site for computer enthusiasts and power users.















  • there isnt any.

    – MARK MY ANSWER
    Jan 3 at 15:44



















  • there isnt any.

    – MARK MY ANSWER
    Jan 3 at 15:44

















there isnt any.

– MARK MY ANSWER
Jan 3 at 15:44





there isnt any.

– MARK MY ANSWER
Jan 3 at 15:44










2 Answers
2






active

oldest

votes


















0














As I can see you need a report about all cells with data validation rules.



The next code creates the sheet with name 'dataValidation report' into the active spreadsheet and puts a little report to there.



function genDataValidationReport() {

var res = Sheets.Spreadsheets.get(SpreadsheetApp.getActive().getId(), {
fields: 'sheets(properties(title),data(rowData(values(dataValidation))))',
includeGridData: false
});

var out = ;

for (var i = 0; i < res.sheets.length; i++) {
Logger.log(res.sheets[i].properties.title);
var rowData = res.sheets[i].data[0].rowData || ;
for (var row = 0; row < rowData.length; row++) {
var values = rowData[row].values || ;
for (var column = 0; column < values.length; column++) {
if (values[column].dataValidation)
out.push([res.sheets[i].properties.title, SpreadsheetApp.getActive().getSheetByName(
res.sheets[i].properties.title).getRange(row + 1, column + 1).getA1Notation(),
values[column].dataValidation.condition.type
]);
}
}
};
var outTitle = 'dataValidation report';
var outSheet = SpreadsheetApp.getActive().getSheetByName(outTitle);
if(!outSheet)
outSheet = SpreadsheetApp.getActive().insertSheet(outTitle);
outSheet.clearContents().getRange(1, 1, out.length, out[0].length).setValues(out);
}


enter image description here






share|improve this answer
























  • I think that you should mention that the Google Sheets Advanced Service should be enabled and to include the instructions or a reference to do that.

    – Rubén
    Jan 6 at 0:22



















0














The visible indicators of cells having data validation applied are




  • Drop-down button

  • The invalid data indicator


If the above indicators aren't shown, then you could use an add-on, Google Apps Script or the Google Sheets API to look for those cells either to apply some special formatting or to make a report of those cells.






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "34"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fwebapps.stackexchange.com%2fquestions%2f123648%2fhow-can-you-find-or-highlight-all-cells-having-validation-in-google-sheets%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    As I can see you need a report about all cells with data validation rules.



    The next code creates the sheet with name 'dataValidation report' into the active spreadsheet and puts a little report to there.



    function genDataValidationReport() {

    var res = Sheets.Spreadsheets.get(SpreadsheetApp.getActive().getId(), {
    fields: 'sheets(properties(title),data(rowData(values(dataValidation))))',
    includeGridData: false
    });

    var out = ;

    for (var i = 0; i < res.sheets.length; i++) {
    Logger.log(res.sheets[i].properties.title);
    var rowData = res.sheets[i].data[0].rowData || ;
    for (var row = 0; row < rowData.length; row++) {
    var values = rowData[row].values || ;
    for (var column = 0; column < values.length; column++) {
    if (values[column].dataValidation)
    out.push([res.sheets[i].properties.title, SpreadsheetApp.getActive().getSheetByName(
    res.sheets[i].properties.title).getRange(row + 1, column + 1).getA1Notation(),
    values[column].dataValidation.condition.type
    ]);
    }
    }
    };
    var outTitle = 'dataValidation report';
    var outSheet = SpreadsheetApp.getActive().getSheetByName(outTitle);
    if(!outSheet)
    outSheet = SpreadsheetApp.getActive().insertSheet(outTitle);
    outSheet.clearContents().getRange(1, 1, out.length, out[0].length).setValues(out);
    }


    enter image description here






    share|improve this answer
























    • I think that you should mention that the Google Sheets Advanced Service should be enabled and to include the instructions or a reference to do that.

      – Rubén
      Jan 6 at 0:22
















    0














    As I can see you need a report about all cells with data validation rules.



    The next code creates the sheet with name 'dataValidation report' into the active spreadsheet and puts a little report to there.



    function genDataValidationReport() {

    var res = Sheets.Spreadsheets.get(SpreadsheetApp.getActive().getId(), {
    fields: 'sheets(properties(title),data(rowData(values(dataValidation))))',
    includeGridData: false
    });

    var out = ;

    for (var i = 0; i < res.sheets.length; i++) {
    Logger.log(res.sheets[i].properties.title);
    var rowData = res.sheets[i].data[0].rowData || ;
    for (var row = 0; row < rowData.length; row++) {
    var values = rowData[row].values || ;
    for (var column = 0; column < values.length; column++) {
    if (values[column].dataValidation)
    out.push([res.sheets[i].properties.title, SpreadsheetApp.getActive().getSheetByName(
    res.sheets[i].properties.title).getRange(row + 1, column + 1).getA1Notation(),
    values[column].dataValidation.condition.type
    ]);
    }
    }
    };
    var outTitle = 'dataValidation report';
    var outSheet = SpreadsheetApp.getActive().getSheetByName(outTitle);
    if(!outSheet)
    outSheet = SpreadsheetApp.getActive().insertSheet(outTitle);
    outSheet.clearContents().getRange(1, 1, out.length, out[0].length).setValues(out);
    }


    enter image description here






    share|improve this answer
























    • I think that you should mention that the Google Sheets Advanced Service should be enabled and to include the instructions or a reference to do that.

      – Rubén
      Jan 6 at 0:22














    0












    0








    0







    As I can see you need a report about all cells with data validation rules.



    The next code creates the sheet with name 'dataValidation report' into the active spreadsheet and puts a little report to there.



    function genDataValidationReport() {

    var res = Sheets.Spreadsheets.get(SpreadsheetApp.getActive().getId(), {
    fields: 'sheets(properties(title),data(rowData(values(dataValidation))))',
    includeGridData: false
    });

    var out = ;

    for (var i = 0; i < res.sheets.length; i++) {
    Logger.log(res.sheets[i].properties.title);
    var rowData = res.sheets[i].data[0].rowData || ;
    for (var row = 0; row < rowData.length; row++) {
    var values = rowData[row].values || ;
    for (var column = 0; column < values.length; column++) {
    if (values[column].dataValidation)
    out.push([res.sheets[i].properties.title, SpreadsheetApp.getActive().getSheetByName(
    res.sheets[i].properties.title).getRange(row + 1, column + 1).getA1Notation(),
    values[column].dataValidation.condition.type
    ]);
    }
    }
    };
    var outTitle = 'dataValidation report';
    var outSheet = SpreadsheetApp.getActive().getSheetByName(outTitle);
    if(!outSheet)
    outSheet = SpreadsheetApp.getActive().insertSheet(outTitle);
    outSheet.clearContents().getRange(1, 1, out.length, out[0].length).setValues(out);
    }


    enter image description here






    share|improve this answer













    As I can see you need a report about all cells with data validation rules.



    The next code creates the sheet with name 'dataValidation report' into the active spreadsheet and puts a little report to there.



    function genDataValidationReport() {

    var res = Sheets.Spreadsheets.get(SpreadsheetApp.getActive().getId(), {
    fields: 'sheets(properties(title),data(rowData(values(dataValidation))))',
    includeGridData: false
    });

    var out = ;

    for (var i = 0; i < res.sheets.length; i++) {
    Logger.log(res.sheets[i].properties.title);
    var rowData = res.sheets[i].data[0].rowData || ;
    for (var row = 0; row < rowData.length; row++) {
    var values = rowData[row].values || ;
    for (var column = 0; column < values.length; column++) {
    if (values[column].dataValidation)
    out.push([res.sheets[i].properties.title, SpreadsheetApp.getActive().getSheetByName(
    res.sheets[i].properties.title).getRange(row + 1, column + 1).getA1Notation(),
    values[column].dataValidation.condition.type
    ]);
    }
    }
    };
    var outTitle = 'dataValidation report';
    var outSheet = SpreadsheetApp.getActive().getSheetByName(outTitle);
    if(!outSheet)
    outSheet = SpreadsheetApp.getActive().insertSheet(outTitle);
    outSheet.clearContents().getRange(1, 1, out.length, out[0].length).setValues(out);
    }


    enter image description here







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Jan 5 at 23:11









    oshliaeroshliaer

    1012




    1012













    • I think that you should mention that the Google Sheets Advanced Service should be enabled and to include the instructions or a reference to do that.

      – Rubén
      Jan 6 at 0:22



















    • I think that you should mention that the Google Sheets Advanced Service should be enabled and to include the instructions or a reference to do that.

      – Rubén
      Jan 6 at 0:22

















    I think that you should mention that the Google Sheets Advanced Service should be enabled and to include the instructions or a reference to do that.

    – Rubén
    Jan 6 at 0:22





    I think that you should mention that the Google Sheets Advanced Service should be enabled and to include the instructions or a reference to do that.

    – Rubén
    Jan 6 at 0:22













    0














    The visible indicators of cells having data validation applied are




    • Drop-down button

    • The invalid data indicator


    If the above indicators aren't shown, then you could use an add-on, Google Apps Script or the Google Sheets API to look for those cells either to apply some special formatting or to make a report of those cells.






    share|improve this answer




























      0














      The visible indicators of cells having data validation applied are




      • Drop-down button

      • The invalid data indicator


      If the above indicators aren't shown, then you could use an add-on, Google Apps Script or the Google Sheets API to look for those cells either to apply some special formatting or to make a report of those cells.






      share|improve this answer


























        0












        0








        0







        The visible indicators of cells having data validation applied are




        • Drop-down button

        • The invalid data indicator


        If the above indicators aren't shown, then you could use an add-on, Google Apps Script or the Google Sheets API to look for those cells either to apply some special formatting or to make a report of those cells.






        share|improve this answer













        The visible indicators of cells having data validation applied are




        • Drop-down button

        • The invalid data indicator


        If the above indicators aren't shown, then you could use an add-on, Google Apps Script or the Google Sheets API to look for those cells either to apply some special formatting or to make a report of those cells.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 6 at 0:23









        RubénRubén

        27.6k636171




        27.6k636171






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Web Applications Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fwebapps.stackexchange.com%2fquestions%2f123648%2fhow-can-you-find-or-highlight-all-cells-having-validation-in-google-sheets%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

            Alcedinidae

            RAC Tourist Trophy