Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
First Time Macro
I am seeking assistance in creating a macro for the first time. I have two
Excel files (File1 and File2). Column "R" in File1 is formated as text numbers. When I type in a value (e.g. "015") I would like a command in File1 that says, "go to File2, Column A, Row 1 to find a match. If no match go to Row 2, Row 3 etc. until it finds a match. When it does find a match, pick up what is in that Row/Column F File2 and put it into File1, Column "S", the same Row I was in when I typed the "015" in Column "R". It's basic "look-up", but I've no idea how to write it; type (e.e. 015) in the first file, go to the second file, find a match and pick up the data in the corresponding cell and copy it into the specified cell in first file. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
First Time Macro
Open File2... assuming lookup range is A:B in Sheet1
Enter this formula in S1 of File1 =VLOOKUP(R1,[File2.xls]Sheet1!$A:$B,2,FALSE) If you close File2 its complete path will be added by Excel before its name. "Greensearch" wrote: I am seeking assistance in creating a macro for the first time. I have two Excel files (File1 and File2). Column "R" in File1 is formated as text numbers. When I type in a value (e.g. "015") I would like a command in File1 that says, "go to File2, Column A, Row 1 to find a match. If no match go to Row 2, Row 3 etc. until it finds a match. When it does find a match, pick up what is in that Row/Column F File2 and put it into File1, Column "S", the same Row I was in when I typed the "015" in Column "R". It's basic "look-up", but I've no idea how to write it; type (e.e. 015) in the first file, go to the second file, find a match and pick up the data in the corresponding cell and copy it into the specified cell in first file. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro / function text time to 24hr excel time passed midnight fortotaling hr's | Excel Worksheet Functions | |||
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable | Excel Worksheet Functions | |||
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable | Excel Discussion (Misc queries) | |||
Time 24:00:00 in macro | Excel Discussion (Misc queries) | |||
Can I get a macro to run at a certain time of day? | Excel Discussion (Misc queries) |