ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   IF Command (https://www.excelbanter.com/excel-worksheet-functions/83518-if-command.html)

WomanOnTop_

IF Command
 
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.




Max

IF Command
 
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, ...
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"WomanOnTop_" wrote in message
...
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.







All times are GMT +1. The time now is 11:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com