Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Bill
The below moves data in columns C to E up one line, change 5 for the number of the column you need to end with . Public Sub MoveStuff() Dim lngLastRow, lngRow As Long With ActiveSheet lngLastRow = Cells.SpecialCells(xlCellTypeLastCell).Row For lngRow = 1 To lngLastRow If Left(.Cells(lngRow, 1).Value, 9) = "Set value" Then .Range(.Cells(lngRow, 3), .Cells(lngRow, 5)).Value = ..Range(.Cells(lngRow + 1, 3), .Cells(lngRow + 1, 5)).Value .Range(.Cells(lngRow + 1, 3), .Cells(lngRow + 1, 5)).Value = Null End If Next End With End Sub -- Tony Green "Bill F" wrote: I have imported a report into excel. In column A I need to look for the word "set value". When I find "set value" in column A I need to move a row of cell that start in column C and are located one row below where where the word "set value" is located to the same row that "Set value" is located. I need to do this for the entire report. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I make cells not move in a worksheet | Excel Worksheet Functions | |||
How can I make the cursor move down 8 cells each time I press ente | Setting up and Configuration of Excel | |||
doubleclick to make cells move to another cell | Excel Programming | |||
Query results make entire sheet's cells move | Excel Programming | |||
Problem with cells.Find within a loop | Excel Programming |