What is the fastest method to search the "BT" column (entire used column) for any value starting with "27W", and then change the value of the BV column in the same row to "my string"?
What is the fastest method to search the "BT" column (entire used column) for any value starting with "27W", and then change the value of the BV column in the same row to "my string"?
Last edited by ks100; 09-02-2015 at 02:24 PM.
This should be fairly quick
![]()
Please Login or Register to view this content.
If you are happy with my response please click the * in the lower left of my post.
I can objectively say this is the absolute fastest method, but it will be close to the fastest. And it will be noticeably MUCH faster then looping through every cell if you have a large data set ( > 10,000 rows).
![]()
Please Login or Register to view this content.
I'm interested in starting a career working with VBA, if anyone knows of any opportunities!
Ahh, I should have pointed out that "27W" was just an example so the script would need to adapt to an ever increasing number size. Basically the number portion is a ticket number and the W is a subcopy of that ticket.
the actual search value I would be using is TICKET & "W" where ticket is a string containing my ticket ID.
The value of TICKET could be any number of digits, is there any way to adapt it for that? My apologies for not being clear in the first post.
FWIW I just compared the two methods on 10,000 plus rows. My method took half the time.
0.234375 vs 0.484375
@stnkynts
Sounds like you've a Data File with Timer...test this one if you will please.
![]()
Please Login or Register to view this content.
John
If you have issues with Code I've provided, I appreciate your feedback.
In the event Code provided resolves your issue, please mark your Thread as SOLVED.
If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.
Try:the actual search value I would be using is TICKET & "W" where ticket is a string containing my ticket ID.
The value of TICKET could be any number of digits, is there any way to adapt it for that?
![]()
Please Login or Register to view this content.
@jaslake
Very nice. 0.109375
@stnkynts
Thanks for doing that![]()
If you really want a fastest method you might consider the following code.
Hopefully some of the speed testers will test it and give results.
It takes account of what I understand are your modified needs in your post#4![]()
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks