Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default trouble with code to move text

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA Code to Automatically move text into above cells? mj_bowen Excel Discussion (Misc queries) 3 January 2nd 10 11:30 AM
Trouble with Code to change sheet name JOUIOUI Excel Programming 3 July 6th 06 04:15 PM
Trouble with this code JOUIOUI Excel Programming 4 June 11th 06 04:49 PM
Trouble Condensing Code Ikaabod Excel Programming 3 April 11th 06 09:53 PM
Print dialog code trouble Tim[_36_] Excel Programming 1 April 18th 04 08:46 AM


All times are GMT +1. The time now is 04:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"