彰化一整天的論壇

 找回密碼
 立即註冊
查看: 581|回復: 0

excel計算合併儲存格有幾個

[複製鏈接]
發表於 2016-1-30 09:16:11 | 顯示全部樓層 |閱讀模式
There are several helpful bits of code for this.
Place your cursor in a merged cell and ask these questions in the Immidiate Window:
Is the activecell a merged cell?
? Activecell.Mergecells True
How many cells are merged?
? Activecell.MergeArea.Cells.Count 2
How many columns are merged?
? Activecell.MergeArea.Columns.Count 2
How many rows are merged?
? Activecell.MergeArea.Rows.Count  1
What's the merged range address?
? activecell.MergeArea.Address  $F$2F$3

資料來源: http://stackoverflow.com/questio ... xcel-with-mergearea
回復

使用道具 舉報

您需要登錄後才可以回帖 登錄 | 立即註冊

本版積分規則

 ㄚ母滴雞湯
 員林香純滴雞精

Archiver|手機版|小黑屋|彰化一整天的論壇(Excel,Office)  |网站地图

GMT+8, 2019-10-16 08:04 , Processed in 0.128588 second(s), 19 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回復 返回頂部 返回列表