Buyer | Item Name | Quantity | Price | item type | $dog | $cat | #dog | #cat |
Joe | dry Cat food | 3 | $30 | 123 | $30 | 3 | ||
John | wet Cat food | 1 | $10 | 321 | ||||
Bill | Dog food | 2 | $10 | 278 | ||||
Jill | bone for dog | 5 | $25 | 432 |
<tbody>
</tbody>
What I want is something that will automatically fill certain columns based on the item name, quantity and price. For example Joe bought dry cat food. I want something that will look at the item name "dry cat food" in the row and fill the columns $cat with the price and #cat with the quantity. Then fill the item type column based on the item name, for example "dry cat food" is always 123.
In other words I want it to look for all rows with specific item names and fill certain columns with the quantity and price and add the item#. For example something that would do this:
if Item name = a
then copy quantity to column g and h
then copy price to column i and j
then make column e = 12
and so on for many different item names.