Extract Dynamic Data From a Table

kmonkmol

Board Regular
Joined
Mar 13, 2014
Messages
50
Sir
I have a Table of Invoice records, But I'm trying to get data for individual Invoice number,
if I use INDEX or VLOOKUP formula that will get zero value also I need greater than zero products and quantity only. Please help me

Invoice No:INV/2019/0020
Customer NameInvoice No:Prod-1Prod-2Prod-3Prod-4Prod-5Prod-6Prod-7Prod-8Prod-9Prod-10Products NameQty
Customer-001INV/2019/0020 1 - 3 - - 4 - - 1 -Prod-11
Customer-002INV/2019/0021 3 2 5 - 2 2 5 1 11 -Prod-33
Customer-003INV/2019/0022 5 4 2 2 - 2 9 - 5 8Prod-64
Customer-004INV/2019/0023 9 6 3 - 2 2 - 2 -Prod-91
Customer-005INV/2019/0024 7 11 8 5 - - - - - -
Customer-006INV/2019/0025 2 9 3 2 3 - - - -
Customer-007INV/2019/0026 1 4 3 5 - - - -
Customer-008INV/2019/0027 2 5 1 6 8 - - - - -
Customer-009INV/2019/0028 1 7 3 8 9 - - - - 2
Customer-010INV/2019/0029 9 6 4 2 - 1 - 5 6 -

<tbody>
</tbody>
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Hi there, I'm somewhat confused, what information are you looking to get? With your VLOOKUP, what number would you expect?


Edit: Just reread your post, are you looking to do a VLOOKUP based on the invoice number to find which products have more than 0?
 
Last edited:
Upvote 0
with PowerQuery unpivot prod columns
then use PivotTable

Invoice No:INV/2019/0020<<< you can select INV number here
AttributeSum of Value
Prod-1
1​
Prod-3
3​
Prod-6
4​
Prod-9
1​
changing the names of columns is a cosmetic
 
Upvote 0
With formulae


Excel 2013/2016
ABCDEFGHIJKLMNOPQ
1Invoice No:INV/2019/0020
2Customer NameInvoice No:Prod-1Prod-2Prod-3Prod-4Prod-5Prod-6Prod-7Prod-8Prod-9Prod-10Products NameQty
3Customer-001INV/2019/00201030040010Prod-11
4Customer-002INV/2019/0021325-225111-Prod-33
5Customer-003INV/2019/00225422-29-58Prod-64
6Customer-004INV/2019/0023963-22-2-Prod-91
7Customer-005INV/2019/002471185------
8Customer-006INV/2019/002529323----
9Customer-007INV/2019/00261435----
10Customer-008INV/2019/002725168-----
11Customer-009INV/2019/002817389----2
12Customer-010INV/2019/00299642-1-56-
Schedule
Cell Formulas
RangeFormula
Q3=IFERROR(INDEX($C$3:$L$12,MATCH($P$1,$B$3:$B$12,0),MATCH($P3,$C$2:$L$2,0)),"")
P3{=IFERROR(INDEX($C$2:$L$2,SMALL(IF(INDEX($C$3:$L$12,MATCH($P$1,$B$3:$B$12,0),0)>0,COLUMN($C:$L)-COLUMN($C2)+1),ROWS($1:1))),"")}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Solution

Forum statistics

Threads
1,215,429
Messages
6,124,834
Members
449,192
Latest member
mcgeeaudrey

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top