Worksheet1 Find data worksheet2, Excel 2000 & 2003

J

jfcby

Hello,

I have Workbook1 Worksheet1 with 4 columns and 100 rows of data:
Column B - Charge # | Column D - Charge #
Row 4 - 0855555555 | 1492
Row 5 - 0846892134 | 2516

In Workbook2 Worksheet1 - 25 the data is setup the same.

How can I begin with Worksheet2 Worksheet1 Column D Row 4 value and
search Worksheet 1 Column D with the same value and replace Workbook 2
Worksheet 1 Column B with value of Workbook 1 Worksheet 1 Column B
moving to the next row until all rows with data have been changed then
moving to the next worksheet?

Thank you for your help,
jfcby
 
J

jfcby

Hello,

I've continued to work on the above question. Now, I have a macro code
that I would like to automate.

How can I modify the macro below so that it will move through each
cell in the specified column?

Code:
Sub FindWSCellData()

Dim rngData As Range
Set rngData = Workbooks("BLDGS_CHARGE_NUMS.XLS").Worksheets("BLDG
LIST NUMERIC (USERFORM)") _
.Range("B4:B494").Find(ActiveCell.Value)

If rngData Is Nothing Then
MsgBox "No data found"
Else
'rngBlank.Select
ActiveCell.Offset(0, -2) = rngData.Offset(0, 1).Value
End If

End Sub

Thank you for your help,
jfcby
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top