Hi,
I have the following list of data:-
I would like a formula to search the column A and B and total the amount in column A next to, for example, g unsalted butter (1250). or 'cloves of garlic (12)
The current DSUM i'm using only returns the total of column A, =DSUM(A7:B22,1,B7:B22) returns 582
The current Index Match i'm using only returns the item in the column, A7:B22,MATCH("lemons",B7:B22,0),2,1) returns lemons.
Any help anyone can provide is very much appreciated.
Thanks,
Pad
I have the following list of data:-
Code:
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]750<style type="text/css">p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; text-align: right; font: 10.0px Verdana}p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Verdana}table.t1 {border-collapse: collapse}td.td1 {border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #cbcbcb #cbcbcb #cbcbcb #cbcbcb; padding: 0.0px 5.0px 0.0px 5.0px}</style>[/TD]
[TD]<style><!--table {mso-displayed-decimal-separator:"\."; mso-displayed-thousand-separator:"\,";}.font5 {color:windowtext; font-size:8.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0;}td {padding-top:1px; padding-right:1px; padding-left:1px; mso-ignore:padding; color:windowtext; font-size:10.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0; mso-number-format:General; text-align:general; vertical-align:bottom; border:none; mso-background-source:auto; mso-pattern:auto; mso-protection:locked visible; white-space:nowrap; mso-rotate:0;}ruby {ruby-align:left;}rt {color:windowtext; font-size:8.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0; mso-char-type:none; display:none;}--></style>[TABLE="width: 196"]
<colgroup><col width="196"> </colgroup><tbody>[TR]
<!--StartFragment--> [TD="width: 196"]g unsalted butter[/TD]
<!--EndFragment--> [/TR]
</tbody>[/TABLE]
<style><!--table {mso-displayed-decimal-separator:"\."; mso-displayed-thousand-separator:"\,";}.font5 {color:windowtext; font-size:8.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0;}td {padding-top:1px; padding-right:1px; padding-left:1px; mso-ignore:padding; color:windowtext; font-size:10.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0; mso-number-format:General; text-align:general; vertical-align:bottom; border:none; mso-background-source:auto; mso-pattern:auto; mso-protection:locked visible; white-space:nowrap; mso-rotate:0;}ruby {ruby-align:left;}rt {color:windowtext; font-size:8.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0; mso-char-type:none; display:none;}--></style>[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]4[/TD]
[TD]<style><!--table {mso-displayed-decimal-separator:"\."; mso-displayed-thousand-separator:"\,";}.font5 {color:windowtext; font-size:8.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0;}td {padding-top:1px; padding-right:1px; padding-left:1px; mso-ignore:padding; color:windowtext; font-size:10.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0; mso-number-format:General; text-align:general; vertical-align:bottom; border:none; mso-background-source:auto; mso-pattern:auto; mso-protection:locked visible; white-space:nowrap; mso-rotate:0;}ruby {ruby-align:left;}rt {color:windowtext; font-size:8.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0; mso-char-type:none; display:none;}--></style>[TABLE="width: 196"]
<colgroup><col width="196"> </colgroup><tbody>[TR]
<!--StartFragment--> [TD="width: 196"]lemons[/TD]
<!--EndFragment--> [/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]6[/TD]
[TD]<style><!--table {mso-displayed-decimal-separator:"\."; mso-displayed-thousand-separator:"\,";}.font5 {color:windowtext; font-size:8.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0;}td {padding-top:1px; padding-right:1px; padding-left:1px; mso-ignore:padding; color:windowtext; font-size:10.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0; mso-number-format:General; text-align:general; vertical-align:bottom; border:none; mso-background-source:auto; mso-pattern:auto; mso-protection:locked visible; white-space:nowrap; mso-rotate:0;}ruby {ruby-align:left;}rt {color:windowtext; font-size:8.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0; mso-char-type:none; display:none;}--></style>[TABLE="width: 196"]
<colgroup><col width="196"> </colgroup><tbody>[TR]
<!--StartFragment--> [TD="width: 196"]cloves garlic[/TD]
<!--EndFragment--> [/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]2[/TD]
[TD]<style><!--table {mso-displayed-decimal-separator:"\."; mso-displayed-thousand-separator:"\,";}.font5 {color:windowtext; font-size:8.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0;}td {padding-top:1px; padding-right:1px; padding-left:1px; mso-ignore:padding; color:windowtext; font-size:10.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0; mso-number-format:General; text-align:general; vertical-align:bottom; border:none; mso-background-source:auto; mso-pattern:auto; mso-protection:locked visible; white-space:nowrap; mso-rotate:0;}ruby {ruby-align:left;}rt {color:windowtext; font-size:8.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0; mso-char-type:none; display:none;}--></style>[TABLE="width: 196"]
<colgroup><col width="196"> </colgroup><tbody>[TR]
<!--StartFragment--> [TD="width: 196"]packs parsley[/TD]
<!--EndFragment--> [/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD]2[/TD]
[TD]<style><!--table {mso-displayed-decimal-separator:"\."; mso-displayed-thousand-separator:"\,";}.font5 {color:windowtext; font-size:8.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0;}td {padding-top:1px; padding-right:1px; padding-left:1px; mso-ignore:padding; color:windowtext; font-size:10.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0; mso-number-format:General; text-align:general; vertical-align:bottom; border:none; mso-background-source:auto; mso-pattern:auto; mso-protection:locked visible; white-space:nowrap; mso-rotate:0;}ruby {ruby-align:left;}rt {color:windowtext; font-size:8.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0; mso-char-type:none; display:none;}--></style>[TABLE="width: 196"]
<colgroup><col width="196"> </colgroup><tbody>[TR]
<!--StartFragment--> [TD="width: 196"]clementine[/TD]
<!--EndFragment--> [/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD]2[/TD]
[TD]<style><!--table {mso-displayed-decimal-separator:"\."; mso-displayed-thousand-separator:"\,";}.font5 {color:windowtext; font-size:8.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0;}td {padding-top:1px; padding-right:1px; padding-left:1px; mso-ignore:padding; color:windowtext; font-size:10.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0; mso-number-format:General; text-align:general; vertical-align:bottom; border:none; mso-background-source:auto; mso-pattern:auto; mso-protection:locked visible; white-space:nowrap; mso-rotate:0;}ruby {ruby-align:left;}rt {color:windowtext; font-size:8.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0; mso-char-type:none; display:none;}--></style>[TABLE="width: 196"]
<colgroup><col width="196"> </colgroup><tbody>[TR]
<!--StartFragment--> [TD="width: 196"]red chilli[/TD]
<!--EndFragment--> [/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD]2[/TD]
[TD]<style><!--table {mso-displayed-decimal-separator:"\."; mso-displayed-thousand-separator:"\,";}.font5 {color:windowtext; font-size:8.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0;}td {padding-top:1px; padding-right:1px; padding-left:1px; mso-ignore:padding; color:windowtext; font-size:10.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0; mso-number-format:General; text-align:general; vertical-align:bottom; border:none; mso-background-source:auto; mso-pattern:auto; mso-protection:locked visible; white-space:nowrap; mso-rotate:0;}ruby {ruby-align:left;}rt {color:windowtext; font-size:8.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0; mso-char-type:none; display:none;}--></style>[TABLE="width: 196"]
<colgroup><col width="196"> </colgroup><tbody>[TR]
<!--StartFragment--> [TD="width: 196"]packs rosemary[/TD]
<!--EndFragment--> [/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD]2[/TD]
[TD]<style><!--table {mso-displayed-decimal-separator:"\."; mso-displayed-thousand-separator:"\,";}.font5 {color:windowtext; font-size:8.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0;}td {padding-top:1px; padding-right:1px; padding-left:1px; mso-ignore:padding; color:windowtext; font-size:10.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0; mso-number-format:General; text-align:general; vertical-align:bottom; border:none; mso-background-source:auto; mso-pattern:auto; mso-protection:locked visible; white-space:nowrap; mso-rotate:0;}ruby {ruby-align:left;}rt {color:windowtext; font-size:8.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0; mso-char-type:none; display:none;}--></style>[TABLE="width: 196"]
<colgroup><col width="196"> </colgroup><tbody>[TR]
<!--StartFragment--> [TD="width: 196"]packs sage[/TD]
<!--EndFragment--> [/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD]24[/TD]
[TD]<style><!--table {mso-displayed-decimal-separator:"\."; mso-displayed-thousand-separator:"\,";}.font5 {color:windowtext; font-size:8.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0;}td {padding-top:1px; padding-right:1px; padding-left:1px; mso-ignore:padding; color:windowtext; font-size:10.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0; mso-number-format:General; text-align:general; vertical-align:bottom; border:none; mso-background-source:auto; mso-pattern:auto; mso-protection:locked visible; white-space:nowrap; mso-rotate:0;}ruby {ruby-align:left;}rt {color:windowtext; font-size:8.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0; mso-char-type:none; display:none;}--></style>[TABLE="width: 196"]
<colgroup><col width="196"> </colgroup><tbody>[TR]
<!--StartFragment--> [TD="width: 196"]bay leaves[/TD]
<!--EndFragment--> [/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]16[/TD]
[TD]500[/TD]
[TD]<style><!--table {mso-displayed-decimal-separator:"\."; mso-displayed-thousand-separator:"\,";}.font5 {color:windowtext; font-size:8.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0;}td {padding-top:1px; padding-right:1px; padding-left:1px; mso-ignore:padding; color:windowtext; font-size:10.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0; mso-number-format:General; text-align:general; vertical-align:bottom; border:none; mso-background-source:auto; mso-pattern:auto; mso-protection:locked visible; white-space:nowrap; mso-rotate:0;}ruby {ruby-align:left;}rt {color:windowtext; font-size:8.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0; mso-char-type:none; display:none;}--></style>[TABLE="width: 196"]
<colgroup><col width="196"> </colgroup><tbody>[TR]
<!--StartFragment--> [TD="width: 196"]g unsalted butter[/TD]
<!--EndFragment--> [/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]17[/TD]
[TD]1[/TD]
[TD]<style><!--table {mso-displayed-decimal-separator:"\."; mso-displayed-thousand-separator:"\,";}.font5 {color:windowtext; font-size:8.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0;}td {padding-top:1px; padding-right:1px; padding-left:1px; mso-ignore:padding; color:windowtext; font-size:10.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0; mso-number-format:General; text-align:general; vertical-align:bottom; border:none; mso-background-source:auto; mso-pattern:auto; mso-protection:locked visible; white-space:nowrap; mso-rotate:0;}ruby {ruby-align:left;}rt {color:windowtext; font-size:8.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0; mso-char-type:none; display:none;}--></style>[TABLE="width: 196"]
<colgroup><col width="196"> </colgroup><tbody>[TR]
<!--StartFragment--> [TD="width: 196"]whole nutmeg[/TD]
<!--EndFragment--> [/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]18[/TD]
[TD]24[/TD]
[TD]<style><!--table {mso-displayed-decimal-separator:"\."; mso-displayed-thousand-separator:"\,";}.font5 {color:windowtext; font-size:8.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0;}td {padding-top:1px; padding-right:1px; padding-left:1px; mso-ignore:padding; color:windowtext; font-size:10.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0; mso-number-format:General; text-align:general; vertical-align:bottom; border:none; mso-background-source:auto; mso-pattern:auto; mso-protection:locked visible; white-space:nowrap; mso-rotate:0;}ruby {ruby-align:left;}rt {color:windowtext; font-size:8.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0; mso-char-type:none; display:none;}--></style>[TABLE="width: 196"]
<colgroup><col width="196"> </colgroup><tbody>[TR]
<!--StartFragment--> [TD="width: 196"]smoked streaky[/TD]
<!--EndFragment--> [/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]19[/TD]
[TD]4[/TD]
[TD]<style><!--table {mso-displayed-decimal-separator:"\."; mso-displayed-thousand-separator:"\,";}.font5 {color:windowtext; font-size:8.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0;}td {padding-top:1px; padding-right:1px; padding-left:1px; mso-ignore:padding; color:windowtext; font-size:10.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0; mso-number-format:General; text-align:general; vertical-align:bottom; border:none; mso-background-source:auto; mso-pattern:auto; mso-protection:locked visible; white-space:nowrap; mso-rotate:0;}ruby {ruby-align:left;}rt {color:windowtext; font-size:8.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0; mso-char-type:none; display:none;}--></style>[TABLE="width: 196"]
<colgroup><col width="196"> </colgroup><tbody>[TR]
<!--StartFragment--> [TD="width: 196"]onions[/TD]
<!--EndFragment--> [/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]20[/TD]
[TD]4[/TD]
[TD]<style><!--table {mso-displayed-decimal-separator:"\."; mso-displayed-thousand-separator:"\,";}.font5 {color:windowtext; font-size:8.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0;}td {padding-top:1px; padding-right:1px; padding-left:1px; mso-ignore:padding; color:windowtext; font-size:10.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0; mso-number-format:General; text-align:general; vertical-align:bottom; border:none; mso-background-source:auto; mso-pattern:auto; mso-protection:locked visible; white-space:nowrap; mso-rotate:0;}ruby {ruby-align:left;}rt {color:windowtext; font-size:8.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0; mso-char-type:none; display:none;}--></style>[TABLE="width: 196"]
<colgroup><col width="196"> </colgroup><tbody>[TR]
<!--StartFragment--> [TD="width: 196"]carrots[/TD]
<!--EndFragment--> [/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]21[/TD]
[TD]4[/TD]
[TD]<style><!--table {mso-displayed-decimal-separator:"\."; mso-displayed-thousand-separator:"\,";}.font5 {color:windowtext; font-size:8.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0;}td {padding-top:1px; padding-right:1px; padding-left:1px; mso-ignore:padding; color:windowtext; font-size:10.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0; mso-number-format:General; text-align:general; vertical-align:bottom; border:none; mso-background-source:auto; mso-pattern:auto; mso-protection:locked visible; white-space:nowrap; mso-rotate:0;}ruby {ruby-align:left;}rt {color:windowtext; font-size:8.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0; mso-char-type:none; display:none;}--></style>[TABLE="width: 196"]
<colgroup><col width="196"> </colgroup><tbody>[TR]
<!--StartFragment--> [TD="width: 196"]celery[/TD]
<!--EndFragment--> [/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]22[/TD]
[TD]1[/TD]
[TD]<style><!--table {mso-displayed-decimal-separator:"\."; mso-displayed-thousand-separator:"\,";}.font5 {color:windowtext; font-size:8.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0;}td {padding-top:1px; padding-right:1px; padding-left:1px; mso-ignore:padding; color:windowtext; font-size:10.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0; mso-number-format:General; text-align:general; vertical-align:bottom; border:none; mso-background-source:auto; mso-pattern:auto; mso-protection:locked visible; white-space:nowrap; mso-rotate:0;}ruby {ruby-align:left;}rt {color:windowtext; font-size:8.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Verdana; mso-generic-font-family:auto; mso-font-charset:0; mso-char-type:none; display:none;}--></style>[TABLE="width: 196"]
<colgroup><col width="196"> </colgroup><tbody>[TR]
<!--StartFragment--> [TD="width: 196"]bulb garlic[/TD]
<!--EndFragment--> [/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]23[/TD]
[TD]6[/TD]
[TD]cloves garlic
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I would like a formula to search the column A and B and total the amount in column A next to, for example, g unsalted butter (1250). or 'cloves of garlic (12)
The current DSUM i'm using only returns the total of column A, =DSUM(A7:B22,1,B7:B22) returns 582
The current Index Match i'm using only returns the item in the column, A7:B22,MATCH("lemons",B7:B22,0),2,1) returns lemons.
Any help anyone can provide is very much appreciated.
Thanks,
Pad