Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Jouioui,
Try: '============= Sub MoveID() Dim rng As Range Dim cell As Range Set rng = Range(Cells(2, "I"), Cells(Rows.Count, "I").End(xlUp)) For Each cell In rng.Cells If Len(Trim(cell.Value)) 6 Then Cells(cell.Row, "J").Value = cell.Value cell.ClearContents End If Next On Error Resume Next End Sub '<<============= --- Regards, Norman "JOUIOUI" wrote in message ... Hi Norman, That worked however all the other values in Col I 6 characters or less, in other words the values I am not moving are being deleted. I just need to delete the cells that are being moved. How could I accomplish that? I appreciate your help thank you. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA Code to Automatically move text into above cells? | Excel Discussion (Misc queries) | |||
Trouble with Code to change sheet name | Excel Programming | |||
Trouble with this code | Excel Programming | |||
Trouble Condensing Code | Excel Programming | |||
Print dialog code trouble | Excel Programming |