ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   If function with Vlookup (https://www.excelbanter.com/excel-worksheet-functions/32928-if-function-vlookup.html)

lil'bibbib

If function with Vlookup
 
Hello... I am currently building database for my July and August customers.
Because I am doing a promotion, those that purchased in July will be able to
get a free course in August. I would like to know how do I build it so that
in the "Amount" column, it would search July data and if the customer number
corresponds then it will return the invoice number in July (which is set up
next to the "Amount" column) and if cant find the customer number, then it
should display "100".

CLR

It's hard to describe with no more info to go on, but assume

Sheet1 cell A1=CustNo., cell B1=Amount, cell C1=JulyAmt
Sheet 2 would have the same headings in A1 and B1, and would be filled with
the July data
Put this formula in Sheet1 C2 and copy down..........

=IF(ISNA(IF(B20,VLOOKUP(A2,Sheet2!A:B,2,FALSE))), 100,IF(B20,VLOOKUP(A2,She
et2!A:B,2,FALSE)))

It's all one formula, watch out for the email work-wrap. Of course you may
have to change the cell references to match your data, but this will give
you an idea...........

Vaya con Dios,
Chuck, CABGx3




"lil'bibbib" wrote in message
...
Hello... I am currently building database for my July and August

customers.
Because I am doing a promotion, those that purchased in July will be able

to
get a free course in August. I would like to know how do I build it so

that
in the "Amount" column, it would search July data and if the customer

number
corresponds then it will return the invoice number in July (which is set

up
next to the "Amount" column) and if cant find the customer number, then it
should display "100".




Bob Phillips

Do you mean something like

=IF(ISNUMBER(MATCH(A2,July!A2:A100,0)),VLOOKUP(A2, July!A2:H100,5,False),100)

where A2 is the customer number and the invoice number is in column E on the
July sheet

--

HTH

RP
(remove nothere from the email address if mailing direct)


"lil'bibbib" wrote in message
...
Hello... I am currently building database for my July and August

customers.
Because I am doing a promotion, those that purchased in July will be able

to
get a free course in August. I would like to know how do I build it so

that
in the "Amount" column, it would search July data and if the customer

number
corresponds then it will return the invoice number in July (which is set

up
next to the "Amount" column) and if cant find the customer number, then it
should display "100".





All times are GMT +1. The time now is 12:40 AM.

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