filex_id
07-26-2005, 12:48 AM
hi :hi: i use a formula as a lookup table in sheet2 how do i get the value from sheet1 by looking at the weight using vba or is there a way to caculate and lookup at the same time using vba for the formula in my excel(more preferred).can any one help my excel in the attachment.
Bob Phillips
07-26-2005, 03:31 AM
You do not need VBA, a formula will do.
Put this inF4
=IF(NOT(ISNA(MATCH(D3&E3,Sheet2!$A$1:$A$1000&Sheet2!$B$1:$B$1000,0))),INDEX(Sheet2!$C$1:$C$1000,MATCH(D3&E3,Sheet2!$A$1:$A$1000&Sheet2!$B$1:$B$1000,0)),IF(NOT(ISNA(MATCH(D3&E3,Sheet2!$E$1:$E$1000&Sheet2!$F$1:$F$1000,0))),INDEX(Sheet2!$G$1:$G$1000,MATCH(D3&E3,Sheet2!$E$1:$E$1000&Sheet2!$F$1:$F$1000,0)),""))
it is an arry formula so commit with Ctrl-Shift-Enter, then copy down.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.