Cells(1, 4).End(xlUp) will return a range object, yet you are using this in a For Next loop. You probably want to add .Row on the end, or maybe .Value, depends what property you want to use of the cell that Cells(1, 4).End(xlUp) returns.

You also probably want to do some checks to make sure you do get a number, and gracefully exit if you don't.

HTH