+ Reply to Thread
Results 1 to 2 of 2

Copying a formula in a blank column as far as data in previous column

  1. #1
    Registered User
    Join Date
    12-16-2005
    Posts
    1

    Copying a formula in a blank column as far as data in previous column

    Hi

    I wish to automate a formula that I have for removing duplicate telephone numbers.

    When recording a macro, I want to paste the formula as far down as the last number (the quantity of numbers to deduplicate will usually be different each time ) which is situated in the previous column.

    Is there a way that I can achieve this, rather than having to paste down the whole column?

    Many Thanks

  2. #2
    Tom Ogilvy
    Guest

    Re: Copying a formula in a blank column as far as data in previous column

    assume you are pasting in column C and using column B as a reference

    Dim rng as Range
    Set rng = Range(Range("B1"),Range("B1").End(xldown))
    set rng = rng.offset(0,1)
    rng(1).copy Destination:=rng

    --
    Regards,
    Tom Ogilvy

    "basildon" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I wish to automate a formula that I have for removing duplicate
    > telephone numbers.
    >
    > When recording a macro, I want to paste the formula as far down as the
    > last number (the quantity of numbers to deduplicate will usually be
    > different each time ) which is situated in the previous column.
    >
    > Is there a way that I can achieve this, rather than having to paste
    > down the whole column?
    >
    > Many Thanks
    >
    >
    > --
    > basildon
    > ------------------------------------------------------------------------
    > basildon's Profile:

    http://www.excelforum.com/member.php...o&userid=29700
    > View this thread: http://www.excelforum.com/showthread...hreadid=494135
    >




+ 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