Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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 addres
for some customers or it may be a new address for a customer that I di
not have an address for. I want to use (list "upd") to update (lis
"db"). Both lists are constructed the same way, Column A custome
number column B customer address.

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

Thanks for any help or direction

--
Brian Matlac
-----------------------------------------------------------------------
Brian Matlack's Profile: http://www.excelforum.com/member.php...nfo&userid=350
View this thread: http://www.excelforum.com/showthread.php?threadid=54944

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Update E-Mail Data Base


Hi Tom!
Sorry for the confusion I am using the generic term not the "Exce
Lists".
I believe that I will be using named ranges ultimately.

Bria

--
Brian Matlac
-----------------------------------------------------------------------
Brian Matlack's Profile: http://www.excelforum.com/member.php...nfo&userid=350
View this thread: http://www.excelforum.com/showthread.php?threadid=54944

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Update E-Mail Data Base


Thanks Tom!! Works like a charm!!

Have a great Day!
Bria

--
Brian Matlac
-----------------------------------------------------------------------
Brian Matlack's Profile: http://www.excelforum.com/member.php...nfo&userid=350
View this thread: http://www.excelforum.com/showthread.php?threadid=54944

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compare two files and update data from another file base on words ina cell separated by commas mishak Excel Worksheet Functions 0 December 9th 09 01:35 AM
update data by e-mail?? Carl R[_2_] New Users to Excel 2 September 30th 09 04:21 PM
how do I mail merge data base from Excel to word eddieg Excel Discussion (Misc queries) 1 September 13th 08 10:02 PM
update a Pivot Table with new data added to the base data Graham Y Excel Discussion (Misc queries) 1 March 19th 07 02:12 PM
I want to transfer a data base file into Excel then do mail merge Jan Excel Discussion (Misc queries) 3 July 7th 06 08:58 PM


All times are GMT +1. The time now is 03:30 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"