IF THEN logic

F

frogman

Sample Data:
A B C D E
F G
CID IID Concerns Interests Contact first timers Identifier
TestData
1 1 Building Fellowshi NO U65286929 a
2 4 Tips for Meeting sp b
1 3 Building Opportuniti NO L35069718 a


What i want to do is:
if column G has an "a" then count column A if it has a 1 in it
if column G has an "b" then count column A if it has a 2 in it
etc.

Seprate the data as first choice and second choice.
 
B

Bob Phillips

=SUMPRODUCT(((G2:G200="a")*(A2:A200=1))+((G2:G200="b")*(A2:A200=2)))

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
F

frogman

close but I didn't explain myself very well


A B C D E F G
CID IID Concerns Interest Contact Identifier Test
1 1 Building Fello NO U652 a
2 4 Tips for Meet b
1 3 Building Oppor NO L350 a

"a" is the first choice that people choose and "b" is the second choice
as in order of importance. Column A has 7 different numbers and i just
want to count the different numbers for the first and second choices.
If cell G1 ="a" then count cell A1 if A1 = "1"
So the end result is the count of 1s in column A if column G as an "a"
in it.
 
B

Bob Phillips

Then just

SUMPRODUCT((G2:G200="a")*(A2:A200=1))

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
Top