Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 16th, 2005, 09:27 AM
Registered User
 
Join Date: Sep 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Searching and Checking Values in other workbooks

Can anyone help me in VBA with searching values in another workbook (preferrably a closed one)and then copying the values into a new spreadsheet. I would also like to check to see if the values match as well. I'm not sure how to start this. Any help would be great. THanks

 
Old September 17th, 2005, 04:15 PM
Authorized User
 
Join Date: Feb 2005
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi,

without opening the workbook with the worksheet u need data from, try this:

path = [path where the file is located] (with \ at the end)
filename= [workbook where data has to be collected]
sheetname = [sheet from worbook with data]
'
string = "'" & path & "[" & filename & "]" & sheetname & "'!" & "r" & i & "c" & j
(i represents the row, j represents the column)
value = ExecuteExcel4Macro(string)

put this piece of code in a loop and you're done





Similar Threads
Thread Thread Starter Forum Replies Last Post
two workbooks--matching values within kwik10z Excel VBA 0 November 29th, 2007 11:51 AM
searching a table for values Nayt32 Access VBA 4 February 27th, 2006 11:19 AM
Checking for Null Values asmodeus BOOK: Beginning VB.NET Databases 2 June 3rd, 2005 03:18 PM
Problem searching for NULL values ltdanp21 SQL Language 2 June 16th, 2004 06:52 PM
Checking Duplicate values and delete rows ppenn Excel VBA 2 February 3rd, 2004 06:57 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.