LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Avoid ,,Select" and ,,Selection" in a few lines of code


but here , lines of code below, I still have a trouble , and in this macro is my last task


,,Columns.Count " starts to count from last column .
I have 5 more columns after
Column(BA) , ( it means Column(BA) ,, to the right " ) ; I use olso and the ,,myCell.Offset(0, -4)" Column with data , that means Column(AW) ,
and the ,,Cut" value must go to range IN THE LEFT of Column (AW) , when it found data
. This last part , ,,Offset(0, 1)" work very well , but the ,,Count" must begin not from last column from sheet but as i just have described .


Well, I just have a work arround with your code , and this lines do my task correctly :

Else: myCell.Offset(0, -4).Cut _
Destination:=.Cells(myCell.Row, myCell.Offset(0,4)).End(xlToLeft).End(xlToRight).O ffset(0, 1)

Maybe exist a little more elegant solution , or code line writeing ,
but it is already ok .

I thank you so much for your really great help ,
and helpfull assistence . I wish you a great week .


 
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
Range("Reset Sheet!F13").Select Makes VBA Code Fail ToferKing Excel Programming 3 July 11th 07 04:18 AM
VB Script: Code for "Sheets in selection" J@Y Excel Discussion (Misc queries) 1 February 9th 07 08:52 PM
macro stops on "selection.autofilter" line of code Rob Excel Programming 5 December 10th 05 02:50 PM
Fix Code: Select Case and "Contains" selection Bettergains Excel Programming 5 April 26th 05 02:22 AM
Using "Cells" to write "Range("A:A,H:H").Select" Trip Ives[_2_] Excel Programming 3 June 5th 04 03:13 PM


All times are GMT +1. The time now is 06:35 PM.

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"