ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   VB code (https://www.excelbanter.com/excel-discussion-misc-queries/46159-vbulletin-code.html)

Meme

VB code
 
Hi all,

I am trying to create a macro using VB. Here is what I want my macro to do :
I have file1 and file 2 saved in each monthly folder like
c:/month/file1.xle
c:/month/file2.xle

I have a spreadsheet like this
A B C D E
Date Unit No. Sale Amt Source1 Source2
9/4/2005 UN01 $2.00
6/8/2004 UN02 $3.00
10/5/2004 UN03 $5.00
My file1 like this
colum A colum B
Unit No Source1
Un02 10
Uni03 12

Now I need go to file1 to find data for Colum D(Source1) by using vlookup
function
based on the unit number then extrive the data to colum D and times 50%.
So after I run the macro my spreadsheet should look like this

A B C D E
Date Unit No. Sale Amt Source1 source2
9/4/2005 UN01 $2.00 8.00
6/8/2004 UN02 $3.00 5.00
10/5/2004 UN03 $5.00 6.00

Any inputs are greatly appreciated !!!!!!!!!

Meme


All times are GMT +1. The time now is 07:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com