Brand spanking new to this VBA fun and ran into a problem. I have been working on transferring data from a easy to enter spreadsheet to a better to look at the data spreadsheet. This part of the macro is working perfectly now, but it is written to copy at the next available blank, so if there are blanks in the middle of the data, it writes over into the wrong field. I have missed hand filling in these blanks with "-" a couple times and thought a quick "Prep" macro would do the trick for me.
To my understanding, I have a code written out to start at a specific cell, go to the next available blank, and fill it with "-". The issue I am finding is I can't find a way to stop the loop at a specific cell. In the example below b51. Please take a look and let me know what I am doing wrong. Once again I am very new so please pretend you are explaining this to a moron...
Thank you in advance!
Sheets("Data Entry").Select
Sheets("Data Entry").Range("d15").Select
Do While ActiveCell < ("d51")
If Sheets("Data Entry").Range("d15").Offset(1, 0) <> "" Then
Sheets("Data Entry").Range("d15").End(xlDown).Select
End If
ActiveCell.Offset(1, 0).Select
ActiveCell.Value = "-"
Loop
I based this off of what has been working great for me:
i = 1
Sheets("Biomass").Select
Range("n2:t2").Select
Selection.Copy
Sheets("Biomass").Select
Sheets("Biomass").Range("n1").Select
Do While i < 181
If Sheets("Biomass").Range("n2").Offset(1, 0) <> "" Then
Sheets("Biomass").Range("n2").End(xlDown).Select
End If
ActiveCell.Offset(1, 0).Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
i = i + 1
Loop
Bookmarks