LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Need Help with Offset


Now how do I make it copy the data after it finds it. It will need to
search the jobcode column.

Emp # Name '''''''''' Dept# '''''Shift'''Hire
Date'''''''''Jobcode''''''Jobtitle
121 '''''John Doe'''''' 2525 '''''''''' A''''''07/08/06'''''''' 56254
''''''''''' Job1
''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''' 25648 ''''''''''''Job2
''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''' 45465 ''''''''''''Job3

And copy the Jobcode ,Job Title and the employee data for each employee
it finds matching the search.
How can I merge this ActiveCell.Offset(0, -5).End(xlUp).Select

To work with the following code?
This code only copys the row data adjacent to the search string (Job
Code)
Thus I get Blank feilds up to the jobcode and job title which are
copied just fine.
The only way around this is to have the persons name listed three times
one for each jobcode.
I would like to have the data laid out as above instead.

On Error GoTo Fixit:
Dim WS As Worksheet
Dim WSNew As Worksheet
Dim rng As Range
Dim Str As String
Dim sqyds
On Error Resume Next
Application.DisplayAlerts = False
Sheets("Prebid Job List").Delete
Application.DisplayAlerts = True
On Error GoTo 0
Dim Message, Title, Default, Mydate
Message = "Enter a Job Code For the Open Position Report ie:830134"
' Set prompt.
Title = "Open Position Pre-Bid Search" ' Set title.

Sname = InputBox(Message, Title)
Set WS = Sheets("Data Entry")
Set rng = WS.Range("A4:G4").CurrentRegion
Str = "Prebid Job List"

'Close AutoFilter first
WS.AutoFilterMode = False
rng.AutoFilter Field:=6, Criteria1:=Str
rng.AutoFilter Field:=6, Criteria1:=Sname

Set WSNew = Worksheets.Add
WS.AutoFilter.Range.Copy

With WSNew.Range("A6")
..PasteSpecial Paste:=8
..PasteSpecial xlPasteValues
..PasteSpecial xlPasteFormats
Application.CutCopyMode = False
..Select
End With
WS.AutoFilterMode = False


--
mrdata
------------------------------------------------------------------------
mrdata's Profile: http://www.excelforum.com/member.php...o&userid=17899
View this thread: http://www.excelforum.com/showthread...hreadid=560096

 
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
SUM & OFFSET KevinE via OfficeKB.com Excel Worksheet Functions 1 February 17th 09 01:10 PM
Offset Q Seanie Excel Worksheet Functions 6 January 16th 09 03:11 AM
Do I really need OFFSET? bflorox Charts and Charting in Excel 3 October 21st 08 09:02 PM
Compare Cell Values, Offset(-1,0), Offset(-1,-1), and xlFillDefaul RyGuy Excel Worksheet Functions 2 September 28th 07 10:54 PM
Problem with Range.Cells.Offset and Range.Cells( row + offset, column) [email protected] Excel Programming 2 August 22nd 05 05:25 AM


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