+ Reply to Thread
Results 1 to 5 of 5

Update E-Mail Data Base

  1. #1
    Forum Contributor
    Join Date
    12-04-2003
    Location
    Burrton, Kansas USA
    MS-Off Ver
    2003
    Posts
    162

    Update E-Mail Data Base

    Hi!
    I need to update a list of e-mail addresses several hundred rows long. I get a report that varies in size and may contain a change of address for some customers or it may be a new address for a customer that I did not have an address for. I want to use (list "upd") to update (list "db"). Both lists are constructed the same way, Column A customer number (Alpha-numeric) column B customer address (I want it to be an active link blue underlined).

    Is there a code that will search "upd" and then change or add info in "db"?

    Thanks for any help or direction!
    Last edited by Brian Matlack; 06-07-2006 at 09:10 AM.

  2. #2
    Tom Ogilvy
    Guest

    RE: Update E-Mail Data Base

    Are you using the generic term list or are these Listobjects in xl2003?

    --
    Regards,
    Tom Ogilvy


    "Brian Matlack" wrote:

    >
    > Hi!
    > I need to update a list of e-mail addresses several hundred rows long.
    > I get a report that varies in size and may contain a change of address
    > for some customers or it may be a new address for a customer that I did
    > not have an address for. I want to use (list "upd") to update (list
    > "db"). Both lists are constructed the same way, Column A customer
    > number column B customer address.
    >
    > Is there a code that will search "upd" and then change or add info in
    > "db"?
    >
    > Thanks for any help or direction!
    >
    >
    > --
    > Brian Matlack
    > ------------------------------------------------------------------------
    > Brian Matlack's Profile: http://www.excelforum.com/member.php...fo&userid=3508
    > View this thread: http://www.excelforum.com/showthread...hreadid=549446
    >
    >


  3. #3
    Forum Contributor
    Join Date
    12-04-2003
    Location
    Burrton, Kansas USA
    MS-Off Ver
    2003
    Posts
    162
    Hi Tom!
    Sorry for the confusion I am using the generic term not the "Excel Lists".
    I believe that I will be using named ranges ultimately.

    Brian

  4. #4
    Tom Ogilvy
    Guest

    Re: Update E-Mail Data Base

    Assumes both lists are in the same workbook and as you said, the "upd" and
    "db" are named ranges with the first column of each containing the unique
    identifier which can be used to match between the databases. If there are
    more than 10 columns involved, then change the 10 to reflect the number of
    columns (minus the first)

    Test this on a copy of your data and probably always make a backup of your
    data before you run it.


    Sub UpdateList()
    Dim rngu as Range, rngdb as Range
    Dim cell as Range, rng1 as Range

    set rngu = range("upd).Columns(1).Cells
    set rngdb = range("db").columns(1).Cells
    for each cell in rngu
    res = application.Match(cell.Value,rngdb,0)
    if not iserror(res) then
    set rng1 = rngdb(res)
    cell.offset(0,1).Resize(1,10).copy _
    rng1.offset(0,1)
    end if
    Next
    End sub

    --
    Regards,
    Tom Ogilvy

    "Brian Matlack" wrote:

    >
    > Hi Tom!
    > Sorry for the confusion I am using the generic term not the "Excel
    > Lists".
    > I believe that I will be using named ranges ultimately.
    >
    > Brian
    >
    >
    > --
    > Brian Matlack
    > ------------------------------------------------------------------------
    > Brian Matlack's Profile: http://www.excelforum.com/member.php...fo&userid=3508
    > View this thread: http://www.excelforum.com/showthread...hreadid=549446
    >
    >


  5. #5
    Forum Contributor
    Join Date
    12-04-2003
    Location
    Burrton, Kansas USA
    MS-Off Ver
    2003
    Posts
    162
    Thanks Tom!! Works like a charm!!

    Have a great Day!
    Brian

+ 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