IF Command

G

Guest

i have two forms. One is a sales form the other an inventory. I want to know
how to have the quantity displayed for a given code on my inventory form
based on the sales form. However, the code may appear anywhere within a range
of rows on the sales form, and not necessarily in the same order as i have
written in the inventory form.

The formula i have been trying to use isnt returning a value for me
IF(D2='Form - Consignment'B25:49) This means that if the code for D2 is seen
anywhere on the form in rows B25 to B49
Value_if_True('Form - Consignment'A25:A49) Then the quantity associated with
that code also needs to be returned
Value_if_False: 0 If not, then 0

But I also need this formula to work for all my codes and i have about 30 of
them.
 
M

Max

One way ..

Try:

=IF(ISNA(MATCH(D2,'Form - Consignment'!$B$25:$B$49,0)),0,INDEX('Form -
Consignment'!$A$25:$A$49,MATCH(D2,'Form - Consignment'!$B$25:$B$49,0)))

As-is, formula can be copied down to return correspondingly for other codes
/ lookup values in D3, D4, ...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top