Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I am looking for a robust code that will count no empty cells at the right of a selection Using Range(Selection, Selection.End(xlToRight)).Select seems to capture all the cells only the next block and not all the columns at the right Thanks Avi |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello Avi,
Am Thu, 7 Jul 2011 09:58:50 -0700 (PDT) schrieb avi: Using Range(Selection, Selection.End(xlToRight)).Select seems to capture all the cells only the next block and not all the columns at the right try: myCount = Selection.Cells.Count - _ WorksheetFunction.CountBlank(Selection.Offset(0, 1)) Regards Claus Busch -- Win XP PRof SP2 / Vista Ultimate SP2 Office 2003 SP2 /2007 Ultimate SP2 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub select_to_lastcolumn()
'select to last filled column in activerow, ignoring intermediate blanks Range(ActiveCell, Cells(ActiveCell.Row, Columns.Count).End(xlToLeft)).Select End Sub What the code does is start from far right column then work back until it reaches the first non-blank cell. Gord Dibben MS Excel MVP On Thu, 7 Jul 2011 09:58:50 -0700 (PDT), avi wrote: Hello, I am looking for a robust code that will count no empty cells at the right of a selection Using Range(Selection, Selection.End(xlToRight)).Select seems to capture all the cells only the next block and not all the columns at the right Thanks Avi |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy Values to empty cell below filled cells in selection | Excel Programming | |||
Count Empty Cells in Range After Cells with Data | Excel Programming | |||
count for empty cells | Excel Discussion (Misc queries) | |||
Message - Selection contains empty cells | Excel Programming | |||
Selection of non-empty cells | Excel Programming |