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

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -