Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In a VBA subroutine, I want to write something like:
Dim r as Range, s as String, n as Long [...set up r, s and eventually n...] r.Value = s r.Resize(1, n).mergeCells = True The problem is: how can I determine n, the number of colums merge? My current workaround is to set n to a constant, namely the maximum number of columns to merge, which I determined by inspection beforehand. There is nothing to the right of r. I am not happy with the "by inspection" requirement; I am actually iterating through all rows in a large worksheet. Moreover, I want n to be the __minimum__ number of columns necessary. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do i automate colour to fill a cell if a range of data is inp | Excel Programming | |||
checkbox1 value = true if range got data | Excel Programming | |||
Undefined MergeArea when MergeCells is true | Excel Programming | |||
setting range().hidden=True causes range error 1004 | Excel Programming |