Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Lost

Assume column A, begining in row 2 in worksheet 3 has an employee IDs and
these IDs can be found in both worksheets 1 and 2 in column A

Dim rng1 as Range, rng2 as Range, rng3 as Range
Dim cell as Range, cell1 as Range, cell2 as Range
Dim res1 as Variant, res2 as Variant
With worksheets("Sheet3")
set rng3 = .Range(.cells(2,1),.cells(rows.count,1).End(xlup))
End with
set rng1 = worksheets("Sheet1").Columns(1).Cells
set rng2 = worksheets("sheet2").Columns(1).Cells
for each cell in rng3
res1 = Application.Match(cell,rng1,0)
res2 = Application.Match(cell,rng2,0)
if not iserror(res1) then
set cell1 = rng1(res1)
cell.offset(0,1).Value = cell1.Offset(0,6).Value
cell.offset(0,2).value = cell1.Offset(0,10).Value
end if
if not iserror(res2) then
set cell2 = rng2(res2)
cell.offset(0,3).Value = cell2.Offset(0,3).Value
cell.offset(0,4).Value = cell2.Offset(0,5).Value
end if
Next

Hopefully this will give you some ideas.

--
Regards,
Tom Ogilvy


"Lost" wrote in message
...
I am looking for some serious help to automate certain tasks in Excel. I

do a
report for a mailroom and I responsible for tracking and updating certain
functions of our department.

Here is the deal, I have three worksheets, worksheet one has the listing

of
all employees information (ie, telephone numbers, building #, etc.) in the
company, worksheet two has all the mailstops for the employees, and

worksheet
three is my report. my goal is to find a way to pull inoformation from
certain rows in worksheet one, and in two and have them placed in three;
basically copy and paste BUT i want it to be automated since i update
worksheet one when people move to new locations.

Does anyone have any suggests? if so, can you also give an example for
reference? (and NO not to do my work! =0)

Thanks!



 
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
Lost Again Argy Excel Discussion (Misc queries) 4 October 29th 08 04:13 AM
How do I keep a running total of pounds lost and percentage lost angel5959 Excel Discussion (Misc queries) 4 January 26th 06 09:18 PM
I'm Lost!!! AceAlmighty82 New Users to Excel 3 January 14th 06 02:29 PM
um... im lost bamboo Excel Worksheet Functions 2 August 27th 05 08:35 PM
I'm Lost, Need Help Dar Excel Worksheet Functions 3 May 30th 05 09:26 PM


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

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

About Us

"It's about Microsoft Excel"