Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tim Tim is offline
external usenet poster
 
Posts: 408
Default Matching text files

Hi,

Is it possible to take the addresses from sheet 2 and add them to sheet 1.

Column A has the same names and format on both sheets, they are just in
different order. The data I work with is almost 50,000 records long or I
would just copy and past, or sort, filter or something. But its not that easy!

I'm trying to find a vba way to match up the names so that I can get the
addresses to add to the correct name.

Any ideas?

Thx in advance.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Matching text files

Look in Excel Help at the Vlookup function

--
Regards,
Tom Ogilvy

"Tim" wrote in message
...
Hi,

Is it possible to take the addresses from sheet 2 and add them to sheet 1.

Column A has the same names and format on both sheets, they are just in
different order. The data I work with is almost 50,000 records long or I
would just copy and past, or sort, filter or something. But its not that

easy!

I'm trying to find a vba way to match up the names so that I can get the
addresses to add to the correct name.

Any ideas?

Thx in advance.



  #3   Report Post  
Posted to microsoft.public.excel.programming
Tim Tim is offline
external usenet poster
 
Posts: 408
Default Matching text files

Hi Tom,

Thank you for writing back, I can write the formulas, I was looking for a
vba way...I can do a little but not that much!

Thanks again Tom:)

"Tom Ogilvy" wrote:

Look in Excel Help at the Vlookup function

--
Regards,
Tom Ogilvy

"Tim" wrote in message
...
Hi,

Is it possible to take the addresses from sheet 2 and add them to sheet 1.

Column A has the same names and format on both sheets, they are just in
different order. The data I work with is almost 50,000 records long or I
would just copy and past, or sort, filter or something. But its not that

easy!

I'm trying to find a vba way to match up the names so that I can get the
addresses to add to the correct name.

Any ideas?

Thx in advance.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Matching text files

It is best to use excel builtin capabilities even in VBA. Also, since you
already know Vlookup:

for each cell in worksheets("Sheet1").Range("A1:A10000")
res = Application.Vlookup(searchstring, _
worksheets("Sheet 2").Range("A1:C50000"),2,False)
if not iserror(res) then
set rng1 = Worksheets("Sheet 2").Range("A1:A50000")(res)
for i = 1 to 8
cell.Offset(0,1).Value = rng1.offset(0,1).value
Next
End if
Next

Another way would be to write the formulas in Sheet 1 using code, then after
they updated, replace them with the values they display.
--
Regards,
Tom Ogilvy

"Tim" wrote in message
...
Hi Tom,

Thank you for writing back, I can write the formulas, I was looking for a
vba way...I can do a little but not that much!

Thanks again Tom:)

"Tom Ogilvy" wrote:

Look in Excel Help at the Vlookup function

--
Regards,
Tom Ogilvy

"Tim" wrote in message
...
Hi,

Is it possible to take the addresses from sheet 2 and add them to

sheet 1.

Column A has the same names and format on both sheets, they are just

in
different order. The data I work with is almost 50,000 records long

or I
would just copy and past, or sort, filter or something. But its not

that
easy!

I'm trying to find a vba way to match up the names so that I can get

the
addresses to add to the correct name.

Any ideas?

Thx in advance.






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
Matching Files on Different Worksheets JoeL Excel Discussion (Misc queries) 0 June 4th 09 05:08 PM
Matching cells to files suddengunfire Excel Discussion (Misc queries) 2 June 30th 08 03:17 PM
Matching Cells in different files to sum. 1gr8tigerfan Excel Worksheet Functions 2 August 1st 07 01:26 PM
Help with Matching Text Fields - Then Moving the Matching Cells Side by Side [email protected] Excel Discussion (Misc queries) 2 June 11th 07 02:38 PM
Matching two files or sheets RayB Excel Discussion (Misc queries) 2 July 12th 06 05:21 PM


All times are GMT +1. The time now is 08:38 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"