MissingInAction
Board Regular
- Joined
- Sep 20, 2019
- Messages
- 85
- Office Version
- 365
- Platform
- Windows
Hi everyone.
I have a lookup formula that must search for waybill numbers based on the company that is selected for invoicing. The company name is located in C13 (on the invoice sheet where the formula is located as well) and the list of waybills is in sheet Data Input in column B. Column D on Data Input has the list of different companies each with different waybills.
This formula has worked fine so far:
I need it to also take into account the month that is selected (Block B10 on Invoices sheet) so that the above formula does not give me all the waybills for every month for a particular company. I have tried doing it this way, but it only gave me a #N/A:
How can I modify the formula to get the desired result?
Thank you
I have a lookup formula that must search for waybill numbers based on the company that is selected for invoicing. The company name is located in C13 (on the invoice sheet where the formula is located as well) and the list of waybills is in sheet Data Input in column B. Column D on Data Input has the list of different companies each with different waybills.
This formula has worked fine so far:
Code:
=LOOKUP(2;1/((COUNTIF($I$1:I2;'Data Input'!$B$4:$B$20000)=0)*($C$13='Data Input'!$D$4:$D$20000));'Data Input'!$B$4:$B$20000)
I need it to also take into account the month that is selected (Block B10 on Invoices sheet) so that the above formula does not give me all the waybills for every month for a particular company. I have tried doing it this way, but it only gave me a #N/A:
Code:
=LOOKUP(2;1/((AND(COUNTIF($B$10;'Data Input'!$A$4:$A$20000);COUNTIF($I$1:I1;'Data Input'!$B$4:$B$20000))=0)*($C$13='Data Input'!$D$4:$D$20000));'Data Input'!$B$4:$B$20000)
How can I modify the formula to get the desired result?
Thank you