Forum

Problem with findin...
 
Notifications
Clear all

Problem with finding count No of cells in Mergearea

2 Posts
2 Users
0 Reactions
79 Views
(@shiva_raj)
Posts: 1
New Member
Topic starter
 
HI

I wrote a VBA code by using Sumifs function. in this code i find out starting column number (for each category box), ending column number based on merged cells (in 2nd row & 11th row (first attachment)) by using #selection.columns.count# . sometimes this formula returns 1 even though there are 6 cells in Mergearea.  When we run the code by using F5, this line of code is not working properly. in the summary sheet (first attachment) few violet BOXES were not getting result. please help me.

thank you in advance.

Regards
shiva

 
Posted : 22/02/2019 5:27 am
Philip Treacy
(@philipt)
Posts: 1631
Member Admin
 

Hi Shiva,

I'm not sure why you are trying to count the number of merged cells.

Don't use merged cells.  Unmerge them and then use 'Center Across Selection'

Format Cells -> Alignment -> Horizontal drop down -> Center Across Selection.

That should make counting cells easier.

Regards

Phil

 
Posted : 25/02/2019 12:23 am
Share: