Live Chat & Podcast at 1:00PM Eastern on Sunday!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Tag Cloud
access acer asus bios bsod crash desktop driver drivers error ethernet excel freeze gaming graphics hard drive hardware hdmi internet laptop lcd malware memory monitor motherboard network operating system printer problem ram registry router slow software sound toshiba trojan ubuntu 11.10 uninstall usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Software & Hardware > Business Applications >
Excel 2007 Find & Replace Across Different Workbook

Reply  
Thread Tools
ususim's Avatar
Junior Member with 2 posts.
 
Join Date: Nov 2009
Experience: Beginner
16-Nov-2009, 02:45 AM #1
Excel 2007 Find & Replace Across Different Workbook
Hi guys,

i don't know anything to Macro and looking forward to learn Excel Macro. Just wondering if there's a place i can learn this from scratch?

BTW. I am getting tired doing this more than 100 times/day copying, matching and replacing the data in different workbook. Could anyone of you here teach me how to make a macro to help me out? I'll really appreciate your help.

My data structure as below:

workbook1:
A*******B*******C******
1*S_ID****Date*****Quantity*
2*103*****1/1/09***25******
3*100*****1/20/09**50******
4*105*****2/14/09**43******
5*104*****2/18/09**75******
6*101*****2/22/09**574*****
7*102*****3/1/09***240*****

workbook2:
A*******B******
1*S_ID****Quantity*
2*100*****210******
3*101*****100******
4*102*****80*******
5*103*****15*******
6*104*****500******
7*105*****300******

When i execute the macro/shortcut in workbook1, it will find the matching S_ID in wb1 and wb2, then replace the quantity from wb1 to wb2 correspondingly; and repeat until the end in wb1. As a result, the ending result will be like this:

workbook2:
A*******B*******
1*S_ID****Quantity**
2*100*****50*******
3*101*****574******
4*102*****240******
5*103*****25*******
6*104*****75*******
7*105*****43*******

hopefully can hear from anyone of you guys soon regarding this macro. Thanks in advance.
turbodante's Avatar
Senior Member with 744 posts.
 
Join Date: Dec 2008
Location: GMT UK
16-Nov-2009, 11:11 AM #2
ususim. Welcome to the forum.

Assuming you will have both workbooks open at the same time - this can be solved by using the formula VLOOKUP.

in workbook2, B2

=VLOOKUP(A2,[Book2]Sheet1!$A$2:$C$9,3,FALSE)

copy this down the row.

NB. $A$2:$C$9 is the area in workbook1 covering all you data. HTH
Reply

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 02:39 AM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.