简体   繁体   中英

Merge Function with Range and Cells

I am trying to merge cells in a loop:

WS1.Range(.Cells(2, 2 + ((i - 1) * 9)), .Cells(2, 2 + ((i - 1) * 9) + 5)).Merge

but is not working; what is the correct way to do that?

WS1.Range(WS1.Cells(2, 2 + ((i - 1) * 9)), WS1.Cells(2, 2 + ((i - 1) * 9) + 5)).Merge

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM