Excel counting line items and not the count from the requested macro -


using simple macro:

function countitalics(r range) long     dim ri range     each ri in r         countitalics = countitalics - ri.font.italic     next ri end function 

this count number of italics not information in italic cell range, meaning: 3 cells not merged count 1

but this: 3 cells merged count 3 (i merged 3 cells make one).

you try

function countitalics(r range) dim ri range each ri in r         if ri.font.italic countitalics = countitalics + 1 / ri.cells.mergearea.count next ri end function 

Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -