Why does DataValidation not follow cell when sorting?

16 Views Asked by At

a DataValidation stays at the original cell when sorting. I need it to follow the data.

I create a spreadsheet with phpspreadsheet version 2.0.

For each row, I have 10 columns. All columns have headers with sorting enabled.

One of the columns is a unique dropdown list created as a DataValidation. It works great until I sort the rows by another column value in Excel for Windows by clicking a column header and selecting 'Sort with largest first'.

When sorting, the DataValidation objects are stuck to the original cells, and do not follow the row data.

I imagine this is intended behavior, but is there a way to make the DataValidation move to the same new row as the other values after sorting? Or is there another way to create a dropdown with x values that are unique per row (and works with sorting)?

0

There are 0 best solutions below