LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Count latest number of continous not-empty cells in a row.

Optionally...

Function GetLastGroupedCols(Rng As Range)
Dim Col1&, Col2&
Col1 = Cells(Rng.Row, Columns.Count).End(xlToLeft).Column
Application.Volatile
If Cells(Rng.Row, Col1).Offset(0, -1) = "" Then
GetLastGroupedCols = 1
Else
Col2 = Cells(Rng.Row, Col1).End(xlToLeft).Column
GetLastGroupedCols = Col1 - Col2 + 1
End If
End Function

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to count the number of cells not empty? Eric Excel Discussion (Misc queries) 9 April 19th 10 09:46 PM
Count the number of columns on row that are not empty within a ran Mathew Excel Discussion (Misc queries) 3 March 30th 10 07:34 PM
Continous number box Egypt709 Excel Discussion (Misc queries) 1 January 23rd 09 11:05 PM
count number of non empty columns Arne Hegefors Excel Programming 2 July 9th 07 02:11 PM
Count Empty Cells in Range After Cells with Data David Excel Programming 16 September 17th 06 03:03 PM


All times are GMT +1. The time now is 06:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"