View Single Post
  #1   Report Post  
John_Efc John_Efc is offline
Junior Member
 
Posts: 1
Default Searching And Summing

Hi there,

Quick question for help here....

I have a spreadsheet where I have the following headings:

___A____________B_________C________D________E_____ ________F
1_username____status____before____after____total changes___total same.
2_AAAA________A_________A________A__________0_____ _______1
3_AAAA________A_________A________A__________0_____ _______1
4_AAAA________A_________A________A__________0_____ _______1
5_AAAA________A_________A________A__________0_____ _______1
6_AAAA________A_________A________A__________0_____ _______1
7_AAAA________A_________A________A__________0_____ _______1

I have total changes so that it shows 1 when before isnt the same as after.
Total same is when before and after are the same.

What I need to do now is come up with a way so that I can total changes and sames for the different usernames by searching for the username.

I have this code

C2 (This is cell of username) K2 (input of username to search)

=IF(AND(K2=C2;F2="1");"1";"0")

So it will put a 1 when the username matches and also total same is 1.

But this only works for row 2.

Is there a way I could use the same principle but reference A1-A7 for the username and total the 1s in F1-F7.

So above would return 6 because AAAA has 6 sames?

Thanks