Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Match value from column A to column A on 2nd sheet and then copy R

I am looking to do something like this

For value in Sheet1(Column A) match to value in Sheet2(Column A) and then
copy Entire Row containing match from Sheet2 only once After lastrow on
Sheet1 even if there are multiple cells with the same value on sheet1.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default Match value from column A to column A on 2nd sheet and then copyR

Try this

Sub FindItemOtherSheet()

Dim sh As Worksheet
Dim f As Range
Dim s As String

Application.ScreenUpdating = False
s = InputBox("Enter Item to find", "Hello", Default)
Set f = Worksheets("Sheet2").Columns("A:A").Find(s,
LookIn:=xlValues)
If Not f Is Nothing Then
f.Rows("1:1").EntireRow.Copy Destination:=Worksheets
("Sheet1").Range("A65536").End(xlUp).Offset(1, 0)
Application.ScreenUpdating = True
Exit Sub
End If


End Sub

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Match value from column A to column A on 2nd sheet and then co

Thank You,

That works great but rather than using an InputBox I would like to use the
value in sheet1columnA as my search value and if it is a duplicate ignore it.

Dan

"CurlyDave" wrote:

Try this

Sub FindItemOtherSheet()

Dim sh As Worksheet
Dim f As Range
Dim s As String

Application.ScreenUpdating = False
s = InputBox("Enter Item to find", "Hello", Default)
Set f = Worksheets("Sheet2").Columns("A:A").Find(s,
LookIn:=xlValues)
If Not f Is Nothing Then
f.Rows("1:1").EntireRow.Copy Destination:=Worksheets
("Sheet1").Range("A65536").End(xlUp).Offset(1, 0)
Application.ScreenUpdating = True
Exit Sub
End If


End Sub


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
Match Column and copy to cell Column D Jeffrey Yau Excel Worksheet Functions 1 October 26th 09 01:53 AM
MATCH A NUMBER IN A COLUMN WITH A COLUMN IN A DIFFERENT SHEET L Curly Excel Discussion (Misc queries) 1 July 7th 09 08:04 PM
Copy column to WKst1 from match of wksht 2 and 3 DanielleVBANewbie Excel Programming 4 July 16th 08 02:11 PM
how to make one column copy from one sheet to anoth column w/o zer areezm Excel Discussion (Misc queries) 3 June 6th 06 10:45 PM
Match Header...Copy Column mjack003 Excel Discussion (Misc queries) 6 September 23rd 05 01:33 PM


All times are GMT +1. The time now is 06:19 AM.

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"