luis felipe
luis felipe

Reputation: 23

Sum with text conditions

Good afternoon, I'm stuck with a small problem of formulas in excel:

I have a table in another sheet and I have to perform the following operations: 1. number of units sold in Bogota. 2. number of units sold in different cities to Bogota.

I'm trying to use the formula:

=SUMIF(DATOS!$G$4:$G$146;"BOGOTA";DATOS!$H$4:$H$146)

For the first requirement works, but at the moment of using it to know which city is different from Bogota, I do not know how to do it; try to use the <> operator but I get an error and placing the formula as follows:

=SUMIF(DATOS!$G$4:$G$146;NOT("BOGOTA");DATOS!$H$4:$H$146)

do not add the data (Summation gives 0). Someone has an idea of the problem.

Upvotes: 1

Views: 62

Answers (1)

Jonathan B
Jonathan B

Reputation: 24

I believe you have to put quotes "like this" around the entire logical statement ""<>BOGOTA"

It can be used like this:

=SUMIF(DATOS!$G$4:$G$146;"<>BOGOTA")

Hope this helps

Upvotes: 1

Related Questions