Posted to microsoft.public.excel.programming
|
|
Try to built an UDF to Count until .....
Just change the counter to count columns instead of rows.
=cuc(a5:x5)
function cuc(mc)
Application.Volatile
counter = 1
For Each c In mc
If Cells(c.Row, c.Column + 1) = Cells(c.Row, c.Column) Then
counter = counter + 1
Else
Exit For
End If
Next
'MsgBox counter
cuc = counter
End Function
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"ytayta555" wrote in message
...
On 28 Apr, 00:34, "Don Guillett" wrote:
How about
But , if I need to use it for count in a ROW , not in a
COLUMN ? I tried , but I cann't resolved it ...
|