Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #8  
Old 03-31-2018, 03:53 AM
p45cal's Avatar
p45cal p45cal is offline Need Macro to Move Text in a Row Windows 10 Need Macro to Move Text in a Row Office 2010 32bit
Expert
 
Join Date: Apr 2014
Posts: 956
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

Quote:
Originally Posted by NoSparks View Post
That didn't go so well. One of the codes never processes what would be the last John Doe's data.
Which code was that?!
Yes, poorly tested. Solved (hopefully) by the addition of:
Code:
Set SicHrs = Union(SicHrs, DataBody.Columns(3).Cells(DataBody.Rows.Count).Offset(1))
directly after the existing Set SicHrs = line.

As to timing, well, I'd expect my offering to be hundreds of times slower - the two codes were designed to handle different scenarios.
In general, I would expect the time taken iterating and testing every cell in a contiguous range as opposed to iterating and not testing every cell in a non-contiguous range such as AnnHrs to be slower however, how much slower would be dependent on the proportion of cells testing positive for action; If only 3 cells in 30k cells needed action I suspect the non-contiguous range method would be faster than if 10k cells needed action. I haven't tested.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
macro to move cells ewso Excel Programming 1 10-11-2017 12:23 AM
Need Macro to Move Text in a Row A macro to find a symbol, delete it, and move the cursor to that location JayBird24 Word VBA 1 08-19-2016 04:26 PM
How to move data - Macro not working ecarter312 Excel Programming 1 08-10-2016 11:26 PM
Need Macro to Move Text in a Row Macro to move focus after entry in a cell Phil H Excel Programming 3 06-18-2015 01:20 PM
Macro - Can I move information from a website and excel to word? redzan Word VBA 1 03-13-2013 07:39 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:00 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft