It is a common problem in many company to get all the unique items list based on a single criteria. For example: if I talk about an "Automatic Invoice Generator (AIG)" where I want to enter a Invoice Number only, and all things related to this number will show in an Invoice Copy or Challan Copy. It might be a dream of many employees to create it. But today I'm gonna show you how you can easily create this Automatic Invoice Generator (AIG) based on a Criteria.
Raw Data and Report Format:
First thing is first. Before doing this I've done a sketch to clear the concept:
Now the base is required. Yes, "Sales Raw Data". This is shown as below:
Design the Invoice Template as you like. I've designed in my way:
Formula used:
In H12 cell you need to enter an Invoice Number. Based on this Invoice Number C15:C21 cell will automatically return the unique Product list and rest of the information regarding this invoice and products are automatically plotted.
The challenge here is returning the Unique Product Name List against an Invoice Number. To do this I have used the below IFERROR(INDEX(MATCH(IF(COUNTIF()))) Array formula in C15 and copy down to C21 cell. The code is below:
Descriptions column returns the product description with th INDEX(Match) formula. SumIFS formula used in Quantity, Unit Price, Amount, Discount and Total Amount column.
This article will help you mainly getting the unique values based on a criteria from a database.
Raw Data and Report Format:
First thing is first. Before doing this I've done a sketch to clear the concept:
Image 1: Sketch to clear the concept
Now the base is required. Yes, "Sales Raw Data". This is shown as below:
Image 2: Sales Raw Data for AIG (Automatic Invoice Generator)
Design the Invoice Template as you like. I've designed in my way:
Image 3: Invoice Design
Formula used:
In H12 cell you need to enter an Invoice Number. Based on this Invoice Number C15:C21 cell will automatically return the unique Product list and rest of the information regarding this invoice and products are automatically plotted.
Image 4: Input Invoice Number area H12
The challenge here is returning the Unique Product Name List against an Invoice Number. To do this I have used the below IFERROR(INDEX(MATCH(IF(COUNTIF()))) Array formula in C15 and copy down to C21 cell. The code is below:
=IFERROR(INDEX(SalesRawData!$H:$H,MATCH(0,IF(SalesRawData!$B:$B=Invoice!$H$12,COUNTIF(Invoice!$C$14:$C14,SalesRawData!$H:$H)),0)),"")
Descriptions column returns the product description with th INDEX(Match) formula. SumIFS formula used in Quantity, Unit Price, Amount, Discount and Total Amount column.
Image 5: Automatic Invoice Generator (AIG)
This article will help you mainly getting the unique values based on a criteria from a database.