LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel Help - Match column in one worksheet to all worksheets in different workbook

Hello everyone!

I have been viewing the Google Excel groups and found lots of help.
Unfortunately, I am not very skilled with Excel VBA and need some more
specific help. Currently, I have a macro on a sheet that will compare
column D in the current sheet with column B in a different worksheet
(all in the same workbook). Instead, I would like the macro to compare
column B in the current sheet to column D in all of the sheets in a
seperate workbook. The other workbook will be in the same directory as
the current workbook. Any help would be much appreciated!

Thank you!

Below is what I have so far:

----------------------------------------------------------------------------------------------------------
Private Sub Validate_Click()

Dim lastrow As Long, j As Integer

Application.Calculation = xlCalculationManual '<=== stop other formulas
from calculating

With Decline

lastrow = Decline.Range("d6").End(xlDown).Row '<=== get last row in col
D (Decline)

For j = 6 To lastrow
res = Application.Match(.Cells(j, 4), Upload.Range("B:B"), 0)
'<===match column D ('Decline') with column B ('Upload')
If IsError(res) Then
.Cells(j, 5).Value = "no"
Else
.Cells(j, 5).Value = "yes"
End If
Next j
End With

MsgBox "Recalculating Analysis Worksheet"

Application.Calculation = xlCalculationAutomatic '<=== resume
autocalculating formulas

MsgBox "Validation Completed!"
End Sub

-------------------------------------------------------------------------

 
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
Look up and match Vendor name in one cell of worksheet from list ofmultiple Vendor names in column of other worksheet insitedge Excel Worksheet Functions 2 March 11th 08 11:36 PM
How can I match numeric data from two column in same worksheet homefunwork.com Excel Discussion (Misc queries) 1 January 26th 07 05:01 PM
Worksheet Macros for All Worksheets in a Workbook? Bob Excel Worksheet Functions 1 October 2nd 06 05:04 PM
Match a value from a column in worksheet WilliamVierra Excel Worksheet Functions 2 August 10th 05 04:49 PM
Search/Match between 2 x separate Worksheets and populate result in third worksheet Alan Bartley Excel Discussion (Misc queries) 1 April 11th 05 05:21 AM


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