Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would use a nested for loop to scroll through your information. Although this can be time consuming, so if you have loads of data it would be better to use Access or SQL
For I = 1 to 1 firstname = workbooks("File1").worksheets("sheet1").range("A" & I).Valu Lastname = workbooks("File1").worksheets("sheet1").range("A" & I).Valu ID2003 = workbooks("File1").worksheets("sheet1").range("A" & I).Valu For I2 = 1 to 1 if firstname = workbooks("File2").worksheets("sheet1").range("A" & I2).Value the if lastname = workbooks("File2").worksheets("sheet1").range("A" & I2).Value the workbooks("File2").worksheets("sheet1").range("A" & I2).Value = ID200 exit fo end i end i next I next This code will need to be modified slightly: the column number, workbook names, worksheet names and the from and to values of the for loops. Change the from value to the same as the first row of data that is NOT the header. The to value should be the last line that contains data. If the to value will change from time to time simply set it to 19999 and add the bellow code into each loop (change any appropriate values If workbooks("File1").worksheets("sheet1").range("A" & I).Value = "" the exit fo end i Hope I have helped regard Russel |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
extracting data from one sheet based on data in another - VLookup? | Excel Worksheet Functions | |||
Extracting the values matching to multiplr columns. | Excel Discussion (Misc queries) | |||
Matching identical data using data only once in the matching proce | Excel Discussion (Misc queries) | |||
Extracting Data for .Txt Files By Unique Field Data | Excel Discussion (Misc queries) | |||
Matching data and linking it to the matching cell | Links and Linking in Excel |