Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
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
  #2   Report Post  
Junior Member
 
Posts: 20
Default

Quote:
Originally Posted by John_Efc View Post
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

Best to use sumif() statement

= sumif(A1:A7, K2 (or whever search username is), F1:F7)

this will sum the values in F for which the corrseponding values in A match K2
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Program Speed - Arrays Searching vs. Row Searching CWillis Excel Programming 8 June 4th 09 06:42 PM
Searching, matching then searching another list based on the match A.S. Excel Discussion (Misc queries) 1 December 13th 06 05:08 AM
searching and summing using string within cell Al Excel Discussion (Misc queries) 2 April 26th 06 04:04 AM
Help searching and summing across multilple worksheets Joe Tapestry Excel Discussion (Misc queries) 7 March 17th 06 05:07 AM
searching for values and summing the corresponding values Simon Excel Worksheet Functions 1 February 4th 05 12:13 AM


All times are GMT +1. The time now is 10:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"