Home |
Search |
Today's Posts |
#11
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"Tom Ogilvy" wrote in message ...
Sub CreatedIndentedBOM() Dim rng As Range, cell As Range Set rng = Range(Cells(3, 5), Cells(Rows.Count, 3).End(xlUp)) For Each cell In rng If Not IsEmpty(cell) And cell.Offset(0, -1) 0 Then If isnumeric(cell.offset(0,-1)) then cell.Offset(0, clng(cell.Offset(0, -1).Value)).Value = cell.Value End if End If Next End Sub Perhaps. You are looping though C3:E20 if 20 is the last row occupied in column C as an example Is that what you want? -- Regards, Tom Ogilvy <snip Tom, it works perfectly. You are a God! PC Thanks again. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy contents from one cell to another | New Users to Excel | |||
how to copy the contents from last cell | Excel Discussion (Misc queries) | |||
Macro to remove contents of cell and move all other contents up one row | Excel Discussion (Misc queries) | |||
Using VB copy contents of a macro to workbook | Excel Programming | |||
Copy cell contents into Macro code | Excel Programming |