Forum Discussion

jaolvera's avatar
jaolvera
Brass Contributor
Aug 16, 2023

VBA Code to apply to certain cells

How do I apply this code only to certain cells, not the whole worksheet

 

5 Replies

  • jaolvera 

    In the line

    Set xRgVal = Cells.SpecoalCells(xlCellTypeAllValidation)

    change Cells to the range you want to limit it to, for example

    Set xRgVal = Range("D2:D100").SpecoalCells(xlCellTypeAllValidation)

Resources