Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
For each loop
How do I create a "for each" loop on each row to check
if a cell is empty and then copy it to another cell on same row? I am having trouble refering to a column. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
For each loop
something like where you want to copy the NON empty cell 2 cells to the
right. x=cells(rows.count,activecell.column) for each c in range(cells(2,activecell.column),cells(cells(x,act ivecell.column)) if c<"" then c.offset(0,2).value=c next -- Don Guillett SalesAid Software "Mark" wrote in message ... How do I create a "for each" loop on each row to check if a cell is empty and then copy it to another cell on same row? I am having trouble refering to a column. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
For each loop
Thank you for your response, but I cannot get it to
work. I put in the last closed parenthesis, still no. Any suggestions? -----Original Message----- something like where you want to copy the NON empty cell 2 cells to the right. x=cells(rows.count,activecell.column) for each c in range(cells(2,activecell.column),cells(cells (x,activecell.column)) if c<"" then c.offset(0,2).value=c next -- Don Guillett SalesAid Software "Mark" wrote in message ... How do I create a "for each" loop on each row to check if a cell is empty and then copy it to another cell on same row? I am having trouble refering to a column. . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
For each loop
Perhaps more info would be helpful to all.
-- Don Guillett SalesAid Software wrote in message ... Thank you for your response, but I cannot get it to work. I put in the last closed parenthesis, still no. Any suggestions? -----Original Message----- something like where you want to copy the NON empty cell 2 cells to the right. x=cells(rows.count,activecell.column) for each c in range(cells(2,activecell.column),cells(cells (x,activecell.column)) if c<"" then c.offset(0,2).value=c next -- Don Guillett SalesAid Software "Mark" wrote in message ... How do I create a "for each" loop on each row to check if a cell is empty and then copy it to another cell on same row? I am having trouble refering to a column. . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Loop | Excel Discussion (Misc queries) | |||
Loop | Excel Discussion (Misc queries) | |||
Find loop doesn't loop | Excel Discussion (Misc queries) | |||
HELP!!!! Can't stop a loop (NOT an infinite loop) | Excel Programming | |||
loop? | Excel Programming |