I've been using a formula for accounting to calculate sales within a bunch of states that looks like this:

```
=IF(COUNTIF(G2150,"MA")+COUNTIF(G2150,"CT")+COUNTIF(G2150,"RI"),IF(EXACT(L2150,"Apple"),(N2150*2),(N2150*4)),"")
```

This formula currently works, however I would like to add on to it and haven't been able to figure it out.

It currently works out as:

- If the state column
`G`

is`MA`

,`RI`

, or`CT`

, and if the product column`L`

is`Apple`

then you multiple the quantity column by 2. - If it's not
`Apple`

, you multiple it by 4. - If it's not in those states you leave it blank.

This formula works great if there are only 2 products involved.

We are adding in new inventory that has different pricing. I need to alter it to something that works like this:

- If the state column
`G`

is`X`

,`Y`

, or`Z`

and if the product column`L`

is`Apple`

, then multiple the quantity column`N`

by 4. - If the product in those same states is
`Orange`

in column`L`

, then multiply by 2. - If the product from a
*different*column`K`

in those same states is`Pineapple`

then multiply the quantity amount`N`

by 3. - Anything not in those states, leave blank. And so on.

Is this possible?

I have three products / three prices from column `K`

to add, plus two products from column `L`

. All of the quantities are in column `N`

.