Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If And Lookup formula

Status
Not open for further replies.

Cordury2

Technical User
Jan 22, 2005
55
US
I have two sheets of data, each containing a look up value (Item #). However, Item #1 maybe on sheet1 and not sheet2 or both.

I would like to create a formula that looks for the item number and returns the sum (Cost) of both sheets.

I could combine the two and create a pivot but would rather do some sort of And If.

Any ideas?
 
As curious as I am about the formula because if the data changes in either sheet the data would be updated automatically but I ended up just combining the data and running a quick pivot table.

Thanks
 
Something like this:
[tt]
=IF(ISNA(VLOOKUP(A1,Sheet2!A1:B5,2,0)),0,VLOOKUP(A1,Sheet2!A1:B5,2,0))+IF(ISNA(VLOOKUP(A1,Sheet3!A1:B5,2,0)),0,VLOOKUP(A1,Sheet3!A1:B5,2,0))
[/tt]
Adjust the sheet names and ranges for your particular situation.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top