View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default code for counting/shifting

typo:

With Activecell
For i = 1 To 10
If .Offset(0,i).Value < "" Then '<== change here
'call procedure
End If
Next i
End With


"Bob Phillips" wrote:

With Activecell
For i = 1 To 10
If .Offset(0,1).Value < "" Then
'call procedure
End If
Next i
End With

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"BorisS" wrote in message
...
I need some code to do the following:

1) start with a given cell
2) count how many of the 10 cells to the right of it are filled with data
3) for each of those cells, perform a small procedure

My hangup right now is how to get the loop structured, as I always screw
up
the definitions of variables, as well as how to use them in code. So if
anyone can give me the first part of this, I can fill in the procedure
inbetween the loop beginning and ending arguments.

Thx.
--
Boris