I have a tilemap and I want to give some cells a specific value so I can target them in code later on. I have tried to add a custom property to a tileset but that seems to add the same custom property to every tile in that tileset.
No, Tiled has no way to assign properties to cells. You can assign custom properties to tiles in a Tileset, but that’ll affect every instance of that tile.
Depending on what exactly you need these custom properties for, other approaches are possible:
Cell-sized Objects holding arbitrary custom properties. This is appropriate if only a small number of cells need properties, but the number of different properties is great.
Tile layers with special tiles that communicate the meaning. This is appropriate if you don’t have a very large number of different properties/values that need to be assigned, and is most efficient when most cells need some values assigned. You can get more mileage out of a small number of tiles if their exact meaning depends on the exact layer they’re on. For example, a set of tiles might communicate collision shapes on a “collision” layer, but light direction and intensity on a “light” layer.
I personally use the latter approach for my own games, and it’s been more convenient than per-cell properties would’ve been. But, as mentioned above, it really depends on your exact needs.