+ Reply to Thread
Results 1 to 11 of 11

Fastest method to search BT column for value starting with "27W" and then adjust adjacent

  1. #1
    Forum Contributor
    Join Date
    09-04-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    298

    Fastest method to search BT column for value starting with "27W" and then adjust adjacent

    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.

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Fastest method to search BT column for value starting with "27W" and then adjust adjac

    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.

  3. #3
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Fastest method to search BT column for value starting with "27W" and then adjust adjac

    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!

  4. #4
    Forum Contributor
    Join Date
    09-04-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    298

    Re: Fastest method to search BT column for value starting with "27W" and then adjust adjac

    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.

  5. #5
    Forum Contributor
    Join Date
    09-04-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    298

    Re: Fastest method to search BT column for value starting with "27W" and then adjust adjac

    Quote Originally Posted by walruseggman View 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.
    This worked amazing thank you! I apologize to the first poster in this thread for not being more clear in my request.

  6. #6
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Fastest method to search BT column for value starting with "27W" and then adjust adjac

    FWIW I just compared the two methods on 10,000 plus rows. My method took half the time.

    0.234375 vs 0.484375

  7. #7
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Fastest method to search BT column for value starting with "27W" and then adjust adjac

    @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.

  8. #8
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Fastest method to search BT column for value starting with "27W" and then adjust adjac

    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?
    Try:

    Please Login or Register  to view this content.

  9. #9
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Fastest method to search BT column for value starting with "27W" and then adjust adjac

    @jaslake

    Very nice. 0.109375

  10. #10
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Fastest method to search BT column for value starting with "27W" and then adjust adjac

    @stnkynts

    Thanks for doing that

  11. #11
    Valued Forum Contributor
    Join Date
    03-21-2013
    Location
    cyberia
    MS-Off Ver
    Excel 2007
    Posts
    457

    Re: Fastest method to search BT column for value starting with "27W" and then adjust adjac

    Quote Originally Posted by ks100 View Post
    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"?
    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.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Find a word "screenshot" and print value "yes" in adjacent Column
    By prat123 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-21-2015, 03:04 PM
  2. Replies: 11
    Last Post: 12-10-2014, 03:00 PM
  3. Update Macro to search column Bfor "Fail" and "Exception"
    By programct in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-10-2014, 02:32 PM
  4. Data Analysis ("Fastest column"?)
    By DataGeekXLS in forum Excel General
    Replies: 8
    Last Post: 01-25-2013, 08:43 PM
  5. Replies: 2
    Last Post: 09-25-2012, 12:53 AM
  6. Replies: 2
    Last Post: 06-29-2012, 06:32 AM
  7. Replies: 2
    Last Post: 05-05-2008, 04:51 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1