Macro to Copy Value Down Column Until Different Value is Encountered

On an Excel spreadsheetI have a value in cell A1. I have a different value in cell A25. I have another value in cell A55. I want to copy the value in A1 in cells A2 thru A24. I then want to copy the value in cell A25 thru A54. I then want to copy value in A55 thru cell A72.

I want to write a macro to do this and distribute the VBA code to multiple users as a means to quickly format their spreadsheets.

The catch is that the "ending" cell locations can change from spreadsheet to spreadsheet. For example, the range on the next spreadsheet could be A1 to A555 for the first value vs. A1 to A25. I need a macro that can identify the different values and then copy the appropriate one down until it meets an unlike value. It then starts the copy process over.

Thanks so much if anyone could supply VBA code for this.

Need help in Tulsa!


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion