Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 151
Default Help to find and replace between sheets

Hi all,
i have 2 sheets as below
column c J
row 6 511 285
row 7 285
row 8 422 625

sheet2 col b m
row 100 510
row 105 511 285
row 120 282
row 125 285
row 800 422 625

find sheet1 511 and 422 in sheet2 (because value next to them is 0) then
put next to them 285 and 625 in sheet2 from sheet1
thanks in advance

regards,
Eddy stan

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Help to find and replace between sheets

On May 14, 4:59*am, Eddy Stan
wrote:
Hi all,
i have 2 sheets as below
column * * c * * * *J
row 6 * * *511 * *285
row 7 * * *285
row 8 * * *422 * *625

sheet2 * * * col b * m
row 100 * * *510
row 105 * * *511 * 285
row 120 * * *282 *
row 125 * * *285
row 800 * * *422 * 625

find sheet1 511 and 422 in sheet2 (because value next to them is 0) then
put next to them 285 and 625 in sheet2 from sheet1
thanks in advance

regards,
Eddy stan


something like this

Option Explicit
Sub m()
Dim ws1 As Worksheet
Dim ws2 As Worksheet
Set ws1 = Worksheets("sheet1")
Set ws2 = Worksheets("sheet2")

Dim rng1 As Range
Dim rng2 As Range
Dim frow As Integer
Dim c As Range
Set rng1 = ws1.Range("C6:C8")
Set rng2 = ws2.Range("B100:B800")
On Error Resume Next

For Each c In rng1
If c.Offset(0, 7) 0 Then
frow = rng2.Find(c).Row
If frow 0 Then ws2.Cells(frow, "M") = c.Offset(0, 7)
frow = 0
End If
Next c
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
Find/Replace Event or Find/Replace for Protected Sheet ... Joe HM Excel Programming 2 October 27th 07 03:55 PM
find duplicate entry and replace across sheets splat Excel Programming 2 March 15th 07 11:39 AM
find replace in multiple sheets based on namebox gabitzu Excel Discussion (Misc queries) 2 December 19th 06 11:30 AM
FIND AND REPLACE DATA BETWEEN TWO EXCEL SHEETS USING FORMULA gkb Excel Discussion (Misc queries) 4 December 7th 06 09:41 AM
Find / Replace sheets vs workbook in VB Bony Pony Excel Worksheet Functions 0 December 8th 04 02:21 PM


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