View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
hotherps[_135_] hotherps[_135_] is offline
external usenet poster
 
Posts: 1
Default Missing something? does not count correctly

Can someone tell me what is wrong with this?
I guess I'm going about it the wrong way. I have a row (96 cells) tha
will only be partially populated. Where evere it starts I need to begi
counting from that cell. Then based on the cells that have the valu
"IND" in them insert the values below.

Thanks

c = 0
for each cell. range("G11,CX298")
if cell.value < "" then
c = c + 1
If cell.value = "IND" _
and c = 8 then
cell.offset(0,9).value = "Brk"

If cell.value = "IND" _
and c = 16 then
cell.offset.value(0,16) = "Lun"
cell.offset.value(0,17) = "Lun"

If cell.value = "IND" _
and c = 24 then
cell.Offset(0,25)value = "Brk"

If cell.value = "IND" _
and c = 32 then
cell.Offset(0,32)value = "Brk"

if cell.value = "" then
c = 0
end if (5 times)
nex

--
Message posted from http://www.ExcelForum.com