Copy multiple ranges with VBA

后端 未结 2 1085
耶瑟儿~
耶瑟儿~ 2020-12-21 17:31

I am trying to copy multiple ranges using Excel VBA. I understand that in order to select multiple ranges, syntax similar to that below is used:

Range(\"A1:B         


        
2条回答
  •  温柔的废话
    2020-12-21 18:07

    @Scott Holtzman provided the solution in a comment:

    I would just adjust the following, since the OP asked for dynamic range names, Set range1 = Range("A1:B" & Range("B" & Rows.Count).End(xlUp).Row) to get the real last cell in column B. Do the same for column F as well

提交回复
热议问题