+ Reply to Thread
Results 1 to 3 of 3

DO in column B WHILE column A <>""

  1. #1
    Registered User
    Join Date
    02-06-2011
    Location
    Birmingham, AL
    MS-Off Ver
    Excel 2010
    Posts
    1

    DO in column B WHILE column A <>""

    I have a copy, paste, and delete function that I do in column B based on a fixed range (B2:B1000) and most of the time it is way to many and every once in a while it is not enough. What I would like to do is have a variable range for those functions based on the numeric values in column A, like a do-while A:A <>. The numeric value in column A will always be between 1 and 999999. The values in column A are sorted smallest to largest. The function I do in A2 is =IF(A2=A3,"DUP","") than I copy it to the set range. Then I do copy and paste special, values. Then I delete all the rows that have DUP in column B. The values in column A are location numbers that I have to update and I format column A as "000000". I am hoping this will speed up the macro, the delete part of the code takes a while when there are only two rows that actually need to be deleted. (DUP = Duplicate)

    Please Login or Register  to view this content.
    Last edited by pike; 02-06-2011 at 03:27 AM. Reason: add code tags for newbie

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: DO in column B WHILE column A <>""

    hi Jeremy4110,
    Did you mean to post in the test forum or would you like it moved to the excel forum help?
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: DO in column B WHILE column A <>""

    This should be nearly instantaneous:
    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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