Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default finding a cell


I have a range of cells (codes) in column h which is dynamic.

I need to cycle through these cells and for each of them find
corresponding cell (or code) in a different workbook.

I then need to copy the row based on that cell (code) from tha
workbook back to another sheet in the first and paste it right at th
bottom.

I think I probably need a With every statement or a loop - but I am no
sure how to start.

Sub FindCode()


FName = ActiveWorkbook.Name 'Save active workbook file name t
variable FName
FPath = ActiveWorkbook.Path 'Save active workbook path t
variable FPath


' With Worksheets(1).Range("NoBlanksRange")
' Set c = .Find(2, LookIn:=xlValues)
' ActiveCell.Select
' Application.CutCopyMode = False
CC = ActiveCell.Copy
Windows("Source.xls").Activate
ActiveCell.Columns("A:A").EntireColumn.Select
Selection.Find(What:="CC", After:=ActiveCell, LookIn:=xlFormulas
_
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext
_
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Rows("1:1").EntireRow.Select
'Application.CutCopyMode = False
Selection.Copy
Windows(FName).Activate
Sheets("Data").Select
Range("a2").Select
Range(Selection, Selection.End(xlDown)).Select

ActiveCell.Offset(-1, 0).Range("A1").Activate
'ActiveSheet.Paste
End Su

--
rbekka3
-----------------------------------------------------------------------
rbekka33's Profile: http://www.excelforum.com/member.php...fo&userid=1403
View this thread: http://www.excelforum.com/showthread.php?threadid=26271

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default finding a cell

Hi
see:
http://www.rondebruin.nl/copy5.htm

-----Original Message-----

I have a range of cells (codes) in column h which is

dynamic.

I need to cycle through these cells and for each of them

find a
corresponding cell (or code) in a different workbook.

I then need to copy the row based on that cell (code)

from that
workbook back to another sheet in the first and paste it

right at the
bottom.

I think I probably need a With every statement or a loop -

but I am not
sure how to start.

Sub FindCode()


FName = ActiveWorkbook.Name 'Save active workbook

file name to
variable FName
FPath = ActiveWorkbook.Path 'Save active workbook

path to
variable FPath


' With Worksheets(1).Range("NoBlanksRange")
' Set c = .Find(2, LookIn:=xlValues)
' ActiveCell.Select
' Application.CutCopyMode = False
CC = ActiveCell.Copy
Windows("Source.xls").Activate
ActiveCell.Columns("A:A").EntireColumn.Select
Selection.Find(What:="CC", After:=ActiveCell,

LookIn:=xlFormulas,
_
LookAt:=xlPart, SearchOrder:=xlByRows,

SearchDirection:=xlNext,
_
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Rows("1:1").EntireRow.Select
'Application.CutCopyMode = False
Selection.Copy
Windows(FName).Activate
Sheets("Data").Select
Range("a2").Select
Range(Selection, Selection.End(xlDown)).Select

ActiveCell.Offset(-1, 0).Range("A1").Activate
'ActiveSheet.Paste
End Sub


--
rbekka33
----------------------------------------------------------

--------------
rbekka33's Profile: http://www.excelforum.com/member.php?

action=getinfo&userid=14033
View this thread:

http://www.excelforum.com/showthread...hreadid=262713

.

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
Finding a cell location Lucask New Users to Excel 3 February 26th 09 01:14 PM
finding last non-blank cell and then copying it to the next cell mike_vr Excel Discussion (Misc queries) 0 January 17th 08 05:02 PM
Finding Corresponding Cell Value Ken Excel Discussion (Misc queries) 2 August 19th 07 03:49 PM
Finding last cell Jim[_2_] Excel Worksheet Functions 15 February 17th 07 07:45 PM
Finding a cell Alan Excel Programming 5 July 22nd 03 06:25 PM


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