Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Please help i have a sheet like this
A b c 2 fun 1 run 2 100 i want to delete the numer2 in column A and move "run" in column A to cell A1, same in column B,C etc i have started a code but it deletes all cells not just the ones with the number 2 in heres my code Sub RemoveCells_ShiftUp() Application.ScreenUpdating = False Application.Calculation = xlManual Dim rw As Long, iCol As Long For rw = ActiveSheet.UsedRange.Rows.Count To 1 Step -1 If ActiveCell.Value = 2 Then _ Cells(rw, 1).Delete Shift:=xlShiftUp Next Application.Calculation = xlAutomatic Application.ScreenUpdating = True End Sub by the way i am not very good with code Hope someone can help |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
delete cells column. Delete empty cells | Excel Worksheet Functions | |||
how can I delete cells containing text within a range of cells | Excel Discussion (Misc queries) | |||
How to delete all the blanc cells in a worksheet and shift cells l | Excel Discussion (Misc queries) | |||
macro to select cells containing specific text and delete all cells but these | Excel Programming | |||
Delete specific cells contents in a row with some locked cells in the same row | Excel Programming |