Forum Discussion

AndresAlfT's avatar
AndresAlfT
Copper Contributor
Mar 13, 2024
Solved

Using Record script in Excel to filter rows in excel across multiple tabs

Hello,   Trying to filter multiple sheets based on column A using the record script in the automate tab in Excel. I get the error below. Same error if I test on basic test of a 3x3 table.  Also inc...
  • SergeiBaklan's avatar
    Mar 13, 2024

    AndresAlfT 

    You toggle autofilter on column A, i.e. on the range which has only one column. Next you apply filter to column 1. No such in the range, columns are numbered starting from 0.

    Try here to change 1 on 0

     sheet1.getAutoFilter().apply(sheet1.getAutoFilter().getRange(), 0, { filterOn: ExcelScript.FilterOn.values, values: ["OK"] });

Resources