|This doesn't make sense: |
"Take cells B-F of the "true" rows and add them to a range (A6-H38) on Worksheet B"
First, I don't know what you mean by "add them to a range". Do you mean "paste them into the range, presumably in the next empty row in that range?
Second, Columns B:F is 6 columns. Columns A:H is 8 columns. Do you see my confusion with that?
re: "I just wanted to know what would happen if more rows were selected and would populate the range than the range had rows. "
Well, typically when you copy/paste a range with VBA, the paste destination is a single cell, not a range, so the code won't know that there isn't enough "room" unless you write code to check first.
For example, this code is going to paste B1:F10, a range that is 2 columns wide and 10 rows long, into Sheet2 starting in A5. It's not going to care if there is data in A7 or B9. It's not even going to fail. It's just going to Paste it.
If you don't want it overwrite existing data, you either have to check the destination range before you paste it or use Protection so that the cells can't be overwritten.
If you use Protection, then the code will throw up an error when it tries to paste something into the Protected range. You would then use an Error Handling routine to deal with the error.
As far as copying just Column B:F of a given row, the code would look something like this:
myRow = 7
Sheets(1).Range("B" & myRow & ":F" & myRow).Copy _
Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.