Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi,
here's what i'm trying to do: have a workbook as db; example: x1 map_nameitem_code Jan-03 Fev-03 Mar-03 a fstock ibz 3 a bstock ibz 6 b fstock ibu 7 a bstock irz 5 have another to input data (by the end user). the data is input with normal desinged maps with xl cells; example: date a fstock ibz 3 a fstock ibu 4 a fstock irz 5 b fstock ibz 6 b fstock ibu 7 b fstock irz 8 have another to sort the data (choosed by the end user). what i can't do is to put the date inputed in the correct db cells. i've than so far the followes: Dim count As Integer Dim n As Integer Dim tabela As String Dim look As String Dim column As Integer Dim rg As Range count = Workbooks("BDs").Worksheets("bd_lx").Range("A2").V alue column = 3 For n = 4 To count look = Workbooks("BDs").Worksheets("bd_lx").Range("B" & n).Value tabela = Workbooks("BDs").Worksheets("bd_lx").Range("A" & n).Value rg = tabela Application.WorksheetFunction.VLookup(look, rg, column, False).Select Selection.Copy Range("B:" & n).Select Selection.End(xlRight).Select ActiveCell.Offset(1, 0).Activate Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Next n please help! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Already told you that Vlookup does not return a cell, so you can't use it to
find a location. See my answer to your original post. Also, your code is full of syntax and logic errors. You need to get a simple piece of code working to test your concepts. -- Regards, Tom Ogilvy "devnext" wrote in message ... hi, here's what i'm trying to do: have a workbook as db; example: x1 map_nameitem_code Jan-03 Fev-03 Mar-03 a fstock ibz 3 a bstock ibz 6 b fstock ibu 7 a bstock irz 5 have another to input data (by the end user). the data is input with normal desinged maps with xl cells; example: date a fstock ibz 3 a fstock ibu 4 a fstock irz 5 b fstock ibz 6 b fstock ibu 7 b fstock irz 8 have another to sort the data (choosed by the end user). what i can't do is to put the date inputed in the correct db cells. i've than so far the followes: Dim count As Integer Dim n As Integer Dim tabela As String Dim look As String Dim column As Integer Dim rg As Range count = Workbooks("BDs").Worksheets("bd_lx").Range("A2").V alue column = 3 For n = 4 To count look = Workbooks("BDs").Worksheets("bd_lx").Range("B" & n).Value tabela = Workbooks("BDs").Worksheets("bd_lx").Range("A" & n).Value rg = tabela Application.WorksheetFunction.VLookup(look, rg, column, False).Select Selection.Copy Range("B:" & n).Select Selection.End(xlRight).Select ActiveCell.Offset(1, 0).Activate Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Next n please help! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
WorksheetFunction.Vlookup | Excel Discussion (Misc queries) | |||
"Unable to get the VLookup property of the WorksheetFunction class | Excel Discussion (Misc queries) | |||
Can't use WorksheetFunction | Excel Discussion (Misc queries) | |||
Worksheetfunction.vlookup and #value error | Excel Worksheet Functions | |||
worksheetfunction | Excel Programming |