I need an excel script that will check each cell content and copy stuff
I need a script to check the number if A? cell in Example1.xlsx matches A? cell in column A in Example2.xlsx, then copy corresponding C cell data in Example1.xls to C cell corresponding row cell in Example2.xlsx
what finished product would look like if script worked
Last edited by caballar; 10-10-2013 at 11:36 PM.
Re: I need an excel script that will check each cell content and copy stuff
You don't need a macro for simple matches like this.
1) Open both files.
2) In Example2 cell C2 put this MATCH formula:
INDEX([Example1.xlsx]Sheet1!$B:$B, MATCH($A2, [Example1.xlsx]Sheet1!$A:$A, 0))
3) Copy C2 down that column.
An alternate version of that formula, in case one of the numbers does not match, would be:
=IFERROR(INDEX([Example1.xlsx]Sheet1!$B:$B, MATCH($A2, [Example1.xlsx]Sheet1!$A:$A, 0)), "")
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use the
icon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
?None of us is as good as all of us?
- Ray Kroc
?Actually, I *am* a rocket scientist.?
- JB (little ones count!)
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
By cyin in forum Excel Programming / VBA / Macros
Last Post: 04-21-2012, 09:49 PM
By tdav20 in forum Excel Formulas & Functions
Last Post: 03-15-2012, 06:32 AM
By k9mikep in forum Excel General
Last Post: 04-07-2010, 02:28 PM
By xlguy in forum Excel Programming / VBA / Macros
Last Post: 03-23-2010, 01:59 PM
By FoxIII in forum Excel General
Last Post: 02-17-2009, 08:25 AM
Tags for this Thread
Search Engine Friendly URLs by vBSEO 3.6.0 RC 1