|I'm not sure why you changed just about everything I suggested.|
You have 2 "start" lines:
Private Sub CommandButton1_Click()
1 - You can only have 1. It can ether be a CommandButton sub or a "regular" sub but not both.
2 - You are telling the code to loop through the Selected range...
For Each sel In Selection
yet you are trying to specify (albeit incorrectly) a fixed range:
Cells(3, H) = Cells(27, H) + 1
As written, H is being used as a variable, which in your case would be equal to 0, so even if you didn't have the "End Sub" problem, the code would fail as soon as it tried to reference Column 0, which doesn't exist.
3 - Even if H was set to a valid value, e.g. 1 for Column A, the only thing your code would do is set e.g. A3 = A27+1 over and over again as it looped through the selected range.
Was there something about my code that you didn't like that made you make all of those incorrect changes?
Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.