Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
what does the resize part do, just for my education?
Thx for the help to all. -- Boris "Tom Ogilvy" wrote: Dim rng as Range, cell as Range, cnt as Long set rng = activecell.offset(0,1).Resize(1,10) cnt = application.countA(rng) for each cell in rng if len(trim(cell.value)) 0 then cell.Select myprocedure end if Next -- Regards, Tom Ogilvy Assumes your procedure acts on the active cell. or just write your code to work with the range reference: cell (and skip the select command) -- Regards, Tom Ogilvy "BorisS" wrote: 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Code for counting the order cells are filled | Excel Discussion (Misc queries) | |||
Simple code for shifting | Excel Discussion (Misc queries) | |||
Counting entries by color code | Excel Discussion (Misc queries) | |||
Counting Code | Excel Programming | |||
Counting names thru code | Excel Programming |