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

[TABLE="width: 1060"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: left"]Invoice No:[/TD]
[TD="align: left"]INV/2019/0020[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: left"]Customer Name[/TD]
[TD="align: left"]Invoice No:[/TD]
[TD="align: left"]Prod-1[/TD]
[TD="align: left"]Prod-2[/TD]
[TD="align: left"]Prod-3[/TD]
[TD="align: left"]Prod-4[/TD]
[TD="align: left"]Prod-5[/TD]
[TD="align: left"]Prod-6[/TD]
[TD="align: left"]Prod-7[/TD]
[TD="align: left"]Prod-8[/TD]
[TD="align: left"]Prod-9[/TD]
[TD="align: left"]Prod-10[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: left"]Products Name[/TD]
[TD="align: left"]Qty[/TD]
[/TR]
[TR]
[TD="align: left"]Customer-001[/TD]
[TD="align: left"]INV/2019/0020[/TD]
[TD="align: left"] 1[/TD]
[TD="align: left"] -[/TD]
[TD="align: left"] 3[/TD]
[TD="align: left"] -[/TD]
[TD="align: left"] -[/TD]
[TD="align: left"] 4[/TD]
[TD="align: left"] -[/TD]
[TD="align: left"] -[/TD]
[TD="align: left"] 1[/TD]
[TD="align: left"] -[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: left"]Prod-1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: left"]Customer-002[/TD]
[TD="align: left"]INV/2019/0021[/TD]
[TD="align: left"] 3[/TD]
[TD="align: left"] 2[/TD]
[TD="align: left"] 5[/TD]
[TD="align: left"] -[/TD]
[TD="align: left"] 2[/TD]
[TD="align: left"] 2[/TD]
[TD="align: left"] 5[/TD]
[TD="align: left"] 1[/TD]
[TD="align: left"] 11[/TD]
[TD="align: left"] -[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: left"]Prod-3[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD="align: left"]Customer-003[/TD]
[TD="align: left"]INV/2019/0022[/TD]
[TD="align: left"] 5[/TD]
[TD="align: left"] 4[/TD]
[TD="align: left"] 2[/TD]
[TD="align: left"] 2[/TD]
[TD="align: left"] -[/TD]
[TD="align: left"] 2[/TD]
[TD="align: left"] 9[/TD]
[TD="align: left"] -[/TD]
[TD="align: left"] 5[/TD]
[TD="align: left"] 8[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: left"]Prod-6[/TD]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD="align: left"]Customer-004[/TD]
[TD="align: left"]INV/2019/0023[/TD]
[TD][/TD]
[TD="align: left"] 9[/TD]
[TD="align: left"] 6[/TD]
[TD="align: left"] 3[/TD]
[TD="align: left"] -[/TD]
[TD="align: left"] 2[/TD]
[TD="align: left"] 2[/TD]
[TD="align: left"] -[/TD]
[TD="align: left"] 2[/TD]
[TD="align: left"] -[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: left"]Prod-9[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: left"]Customer-005[/TD]
[TD="align: left"]INV/2019/0024[/TD]
[TD="align: left"] 7[/TD]
[TD="align: left"] 11[/TD]
[TD="align: left"] 8[/TD]
[TD="align: left"] 5[/TD]
[TD="align: left"] -[/TD]
[TD="align: left"] -[/TD]
[TD="align: left"] -[/TD]
[TD="align: left"] -[/TD]
[TD="align: left"] -[/TD]
[TD="align: left"] -[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: left"]Customer-006[/TD]
[TD="align: left"]INV/2019/0025[/TD]
[TD][/TD]
[TD="align: left"] 2[/TD]
[TD="align: left"] 9[/TD]
[TD="align: left"] 3[/TD]
[TD="align: left"] 2[/TD]
[TD="align: left"] 3[/TD]
[TD="align: left"] -[/TD]
[TD="align: left"] -[/TD]
[TD="align: left"] -[/TD]
[TD="align: left"] -[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: left"]Customer-007[/TD]
[TD="align: left"]INV/2019/0026[/TD]
[TD][/TD]
[TD="align: left"] 1[/TD]
[TD][/TD]
[TD="align: left"] 4[/TD]
[TD="align: left"] 3[/TD]
[TD="align: left"] 5[/TD]
[TD="align: left"] -[/TD]
[TD="align: left"] -[/TD]
[TD="align: left"] -[/TD]
[TD="align: left"] -[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: left"]Customer-008[/TD]
[TD="align: left"]INV/2019/0027[/TD]
[TD="align: left"] 2[/TD]
[TD="align: left"] 5[/TD]
[TD="align: left"] 1[/TD]
[TD="align: left"] 6[/TD]
[TD="align: left"] 8[/TD]
[TD="align: left"] -[/TD]
[TD="align: left"] -[/TD]
[TD="align: left"] -[/TD]
[TD="align: left"] -[/TD]
[TD="align: left"] -[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: left"]Customer-009[/TD]
[TD="align: left"]INV/2019/0028[/TD]
[TD="align: left"] 1[/TD]
[TD="align: left"] 7[/TD]
[TD="align: left"] 3[/TD]
[TD="align: left"] 8[/TD]
[TD="align: left"] 9[/TD]
[TD="align: left"] -[/TD]
[TD="align: left"] -[/TD]
[TD="align: left"] -[/TD]
[TD="align: left"] -[/TD]
[TD="align: left"] 2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: left"]Customer-010[/TD]
[TD="align: left"]INV/2019/0029[/TD]
[TD="align: left"] 9[/TD]
[TD="align: left"] 6[/TD]
[TD="align: left"] 4[/TD]
[TD="align: left"] 2[/TD]
[TD="align: left"] -[/TD]
[TD="align: left"] 1[/TD]
[TD="align: left"] -[/TD]
[TD="align: left"] 5[/TD]
[TD="align: left"] 6[/TD]
[TD="align: left"] -[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
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

[Table="width:, class:head"]
[tr=bgcolor:#FFFFFF][td=bgcolor:#DDEBF7]Invoice No:[/td][td=bgcolor:#DDEBF7]INV/2019/0020[/td][td]<<< you can select INV number here[/td][/tr]

[tr=bgcolor:#FFFFFF][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#DDEBF7]Attribute[/td][td=bgcolor:#DDEBF7]Sum of Value[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td]Prod-1[/td][td]
1​
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td]Prod-3[/td][td]
3​
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td]Prod-6[/td][td]
4​
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td]Prod-9[/td][td]
1​
[/td][td][/td][/tr]
[/table]

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,223,983
Messages
6,175,779
Members
452,668
Latest member
mrider123

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