pratiksuhasaria
New Member
- Joined
- Mar 26, 2019
- Messages
- 24
Hi everyone
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Product[/TD]
[TD]wholeseller[/TD]
[TD]price/kg[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]ABC[/TD]
[TD]Rs 50[/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD]ABC[/TD]
[TD]Rs 30[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]XYZ[/TD]
[TD]Rs 40[/TD]
[/TR]
</tbody>[/TABLE]
Using Product as the key i want to extract all the datas in new table like
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Product[/TD]
[TD]ABC(Price)[/TD]
[TD]XYZ(Price)[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]Rs 50[/TD]
[TD]40[/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD]Rs 30[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I used formula to get Rs 50
= if("Apple" = index(A:C,MATCH("Apple",$A:$A,0),MATCH("Product",$A$1:$C$1,0),if("ABC" = index(A:C,MATCH("Apple",$A:$A,0),MATCH("wholeseller",$A$1:$C$1,0),INDEX($A$1:$C$4,MATCH("Apple",$A:$A,0),MATCH("Date",$A$1:$C$1,0)),""),"")
but when i use same formula except in place of "ABC" "XYZ" is used at XYZ column the following fuction becomes false
= if("Apple" = index(A:C,MATCH("Apple",$A:$A,0),MATCH("Product",$A$1:$C$1,0),if("XYZ" = index(A:C,MATCH("Apple",$A:$A,0),MATCH("wholeseller",$A$1:$C$1,0),INDEX($A$1:$C$4,MATCH("Apple",$A:$A,0),MATCH("Date",$A$1:$C$1,0)),""),"")
after debugging i came to know as there are two same value in product ie Apple it is considering only the first index it encounter but ignoring the rest.
But i dont want this i want each apple's index to be different.
Please Help
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Product[/TD]
[TD]wholeseller[/TD]
[TD]price/kg[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]ABC[/TD]
[TD]Rs 50[/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD]ABC[/TD]
[TD]Rs 30[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]XYZ[/TD]
[TD]Rs 40[/TD]
[/TR]
</tbody>[/TABLE]
Using Product as the key i want to extract all the datas in new table like
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Product[/TD]
[TD]ABC(Price)[/TD]
[TD]XYZ(Price)[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]Rs 50[/TD]
[TD]40[/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD]Rs 30[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I used formula to get Rs 50
= if("Apple" = index(A:C,MATCH("Apple",$A:$A,0),MATCH("Product",$A$1:$C$1,0),if("ABC" = index(A:C,MATCH("Apple",$A:$A,0),MATCH("wholeseller",$A$1:$C$1,0),INDEX($A$1:$C$4,MATCH("Apple",$A:$A,0),MATCH("Date",$A$1:$C$1,0)),""),"")
but when i use same formula except in place of "ABC" "XYZ" is used at XYZ column the following fuction becomes false
= if("Apple" = index(A:C,MATCH("Apple",$A:$A,0),MATCH("Product",$A$1:$C$1,0),if("XYZ" = index(A:C,MATCH("Apple",$A:$A,0),MATCH("wholeseller",$A$1:$C$1,0),INDEX($A$1:$C$4,MATCH("Apple",$A:$A,0),MATCH("Date",$A$1:$C$1,0)),""),"")
after debugging i came to know as there are two same value in product ie Apple it is considering only the first index it encounter but ignoring the rest.
But i dont want this i want each apple's index to be different.
Please Help
Last edited: