I have some simple code to loop through each cell in a selection to modify it but I would like to modify the last cell in the selection differently.
Is there a simple method to identify when the For Each loop has reached the last cell in the Selected range?
Here's a simple example. For this example, I'm adding a comma to each cell so I can drop the selected cells into an SQL In statement. I don't want the last cell to have a comma added.
Dim cell As Range
For Each cell In Selection
cell.Value = cell.Value & ","