Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copying a cell value to a specific cells
Hi,
I am looping through a range of cells looking for certain criteria. When one is reached, I want to copy the value into the next 10 cells in the same row as the active cell in the loop. I am trying to use the offset property to do this but cannot get it to work. Is this the right way to approach this? kind regards, Matt |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copying a cell value to a specific cells
hi
would have been nice if you had posted your code. but this sniplet does what you want. use it as an example. Sub doit() Dim r As Range Set r = Range("A1:A10") For Each cell In r If cell = "x" Then 'find object For y = 1 To 10 cell.Offset(0, y) = "x" Next y End If Next cell End Sub regards FSt1 "MJKelly" wrote: Hi, I am looping through a range of cells looking for certain criteria. When one is reached, I want to copy the value into the next 10 cells in the same row as the active cell in the loop. I am trying to use the offset property to do this but cannot get it to work. Is this the right way to approach this? kind regards, Matt |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copying cells at a specific interval | Excel Programming | |||
Copying specific value in cell into next empty row on different sheet | Excel Discussion (Misc queries) | |||
Copying specific cells from a sheet to another | Excel Discussion (Misc queries) | |||
Specific keywords copying data to cells | Excel Worksheet Functions | |||
Copying block (range of cells) based on a value of a specific cell-VBA | Excel Programming |