Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

vlookup with two imputs

  Asked By: Decha    Date: Sep 22    Category: MS Office    Views: 771
  

Anyway I have a table that
has to use two inputs to distinguish between the records. Therefore, I
need to find a way to do a Vlookup based on two inputs meaning look up A
in table XYZ and then check for what record also corresponds to column
B. If anyone needs more clarification I can add a sample table later.
I already have a pretty in depth code that uses Vlookup to populate a
one table with another so I am looking for some way to correspond this
the current vlookup code that is already there. Thanks



Cells(KeyStartRow, GroupLeadCol).Select

Selection.Formula = "=VLOOKUP(" & Cells(KeyStartRow,
BillCol).Address(RowAbsolute:=False, ColumnAbsolute:=False) & ",'Ref.
Tables'!H:M,4,FALSE)"

'''''''''''now checks for cells(keystartrow, modelcol) = Ref.
Tables'!A:E,2,FALSE if not move to next record

Selection.AutoFill Destination:=Range(Cells(KeyStartRow,
GroupLeadCol), Cells(KeyEndRow, GroupLeadCol))

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Muriel Dunn     Answered On: Sep 22

Use SumProduct, I think. (Not clear from a casual glance what your VLookUp
is actually doing.) I think there are examples in the archives of this
list.

If not, please give an example of the VLookUp you can do - i.e. one lookup -
but not from the inside of VBA code. Also, indicate what the second check
you want to do is.

 
Didn't find what you were looking for? Find more on vlookup with two imputs Or get search suggestion and latest updates.




Tagged: