Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Using either AND function, or nested IF functions, I'm trying to sum data in
a third column for only those items that meet both of the requirements in the AND function. I can manage to sum the entire column. Any ideas? Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Do you have an example of the data you are using?
"Leona" wrote: Using either AND function, or nested IF functions, I'm trying to sum data in a third column for only those items that meet both of the requirements in the AND function. I can manage to sum the entire column. Any ideas? Thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
60-22677 IL 2 74
60-22799 IL 0 60-22775 WI 7 60-22444 IL 4 60-22804 WI 1 60-22799 WI 0 60-22677 IL 1 The first column represents a manager ID number. The second column represents location. The third column represents the number of items being measured. Some managers overlap states. What I'd like the formula to do is first ID manager AND state, and then sum the items in column 3 for only those data sets which are (true,true). Does that help clarify? Thanks! "LWendel" wrote: Do you have an example of the data you are using? "Leona" wrote: Using either AND function, or nested IF functions, I'm trying to sum data in a third column for only those items that meet both of the requirements in the AND function. I can manage to sum the entire column. Any ideas? Thanks |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm not clear as to what the requirements to get a sum are. What are the
items that should be (true,true) ? "Leona" wrote: 60-22677 IL 2 74 60-22799 IL 0 60-22775 WI 7 60-22444 IL 4 60-22804 WI 1 60-22799 WI 0 60-22677 IL 1 The first column represents a manager ID number. The second column represents location. The third column represents the number of items being measured. Some managers overlap states. What I'd like the formula to do is first ID manager AND state, and then sum the items in column 3 for only those data sets which are (true,true). Does that help clarify? Thanks! "LWendel" wrote: Do you have an example of the data you are using? "Leona" wrote: Using either AND function, or nested IF functions, I'm trying to sum data in a third column for only those items that meet both of the requirements in the AND function. I can manage to sum the entire column. Any ideas? Thanks |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You'll see in column 1 that there are various manager IDs. In column 2,
various state locations. We want to be able to measure how many items belong to a given manager, contingent upon location as well. Example: If I want to find the number of items for manager 60-22799 in WI only (row 6), the answer would be 4. In the case of the other reference to manager 60-22799 (row 2), the totality of the AND statement would be false as the other incident of this manager showing up in the table is tied to IL and would therefore be eliminated (true manager #, false state location). How do I sum data for only specific managers in specific locations? "LWendel" wrote: I'm not clear as to what the requirements to get a sum are. What are the items that should be (true,true) ? "Leona" wrote: 1 60-22677 IL 2 74 2 60-22799 IL 0 3 60-22775 WI 7 4 60-22444 IL 4 5 60-22804 WI 1 6 60-22799 WI 4 7 60-22677 IL 1 The first column represents a manager ID number. The second column represents location. The third column represents the number of items being measured. Some managers overlap states. What I'd like the formula to do is first ID manager AND state, and then sum the items in column 3 for only those data sets which are (true,true). Does that help clarify? Thanks! "LWendel" wrote: Do you have an example of the data you are using? "Leona" wrote: Using either AND function, or nested IF functions, I'm trying to sum data in a third column for only those items that meet both of the requirements in the AND function. I can manage to sum the entire column. Any ideas? Thanks |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Leona,
Here's how you want to do it: =SUM(IF(A$1:A$7="60-22799", IF(B$1:B$7="IL",C$1:C$7, 0), 0)) After typing that formula in the cell (or pasting it), you must click Ctrl+Enter instead of just enter, as it is an array formula. Also, if you change, you must make sure that all references must be of the same size, so if you reference A1:A10, you must reference B1:B10 and C1:C10. Let me know if you have any questions. Mark |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
THANKS MARK! I'll try that. Appreciate your help.
"Mark Bigelow" wrote: Hi Leona, Here's how you want to do it: =SUM(IF(A$1:A$7="60-22799", IF(B$1:B$7="IL",C$1:C$7, 0), 0)) After typing that formula in the cell (or pasting it), you must click Ctrl+Enter instead of just enter, as it is an array formula. Also, if you change, you must make sure that all references must be of the same size, so if you reference A1:A10, you must reference B1:B10 and C1:C10. Let me know if you have any questions. Mark |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you have a lot of data and it always added to then I would suggest
linking it to a access database where you can do a sum query that would always give you the totals no matter how much data you entered into the spreadsheet. This way you would not have to be constantly changing the formula and would not need a seperate formula for each manager. If you need help on how to set the database and linkage up let me know. "Leona" wrote: THANKS MARK! I'll try that. Appreciate your help. "Mark Bigelow" wrote: Hi Leona, Here's how you want to do it: =SUM(IF(A$1:A$7="60-22799", IF(B$1:B$7="IL",C$1:C$7, 0), 0)) After typing that formula in the cell (or pasting it), you must click Ctrl+Enter instead of just enter, as it is an array formula. Also, if you change, you must make sure that all references must be of the same size, so if you reference A1:A10, you must reference B1:B10 and C1:C10. Let me know if you have any questions. Mark |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Mark --
ATTABOY!!!!!!!!! Using your formula and Help through Excel, I found that I must use Shift+Control+Enter to enter the Array formula. The formula works brilliantly. Thanks so much for your time -- appreciate it! "Mark Bigelow" wrote: Hi Leona, Here's how you want to do it: =SUM(IF(A$1:A$7="60-22799", IF(B$1:B$7="IL",C$1:C$7, 0), 0)) After typing that formula in the cell (or pasting it), you must click Ctrl+Enter instead of just enter, as it is an array formula. Also, if you change, you must make sure that all references must be of the same size, so if you reference A1:A10, you must reference B1:B10 and C1:C10. Let me know if you have any questions. Mark |
#10
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Mark --
We've tried and are still not getting a valid response. We've done a test so that we can determine what the valid response should be. Instead of coming up with the numeric value, we're getting a zero. It shouldn't be zero (as in no items counted), so it must be an indicator of a false in the nested if functions somewhere. Any ideas? Thanks "Leona" wrote: Using either AND function, or nested IF functions, I'm trying to sum data in a third column for only those items that meet both of the requirements in the AND function. I can manage to sum the entire column. Any ideas? Thanks |
#11
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Try: =sum((A1:A10="60-22677")*(B1:B10="IL")*(C1:C10)) and enter as array formula as before HTH "Leona" wrote: Mark -- We've tried and are still not getting a valid response. We've done a test so that we can determine what the valid response should be. Instead of coming up with the numeric value, we're getting a zero. It shouldn't be zero (as in no items counted), so it must be an indicator of a false in the nested if functions somewhere. Any ideas? Thanks "Leona" wrote: Using either AND function, or nested IF functions, I'm trying to sum data in a third column for only those items that meet both of the requirements in the AND function. I can manage to sum the entire column. Any ideas? Thanks |
#12
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks -- tried it and am still coming up with an invalid sum. The test
spread I worked up should total 11 for that manager in IL. It's coming up with zero. Any other ideas? Thanks! "Toppers" wrote: Hi, Try: =sum((A1:A10="60-22677")*(B1:B10="IL")*(C1:C10)) and enter as array formula as before HTH "Leona" wrote: Mark -- We've tried and are still not getting a valid response. We've done a test so that we can determine what the valid response should be. Instead of coming up with the numeric value, we're getting a zero. It shouldn't be zero (as in no items counted), so it must be an indicator of a false in the nested if functions somewhere. Any ideas? Thanks "Leona" wrote: Using either AND function, or nested IF functions, I'm trying to sum data in a third column for only those items that meet both of the requirements in the AND function. I can manage to sum the entire column. Any ideas? Thanks |
#13
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I tried it with the data from your note and it worked OK. I got an answer of
3 for ID of 60-22677 and IL - that's correct?. Stating the obvious but check that the ID and State exist in the data and/or SUM formula. If they don't you will get an answer of 0. An extra blank on the field e.g '60-22677b ' will give also give a result of 0. (b=blank) "Leona" wrote: Thanks -- tried it and am still coming up with an invalid sum. The test spread I worked up should total 11 for that manager in IL. It's coming up with zero. Any other ideas? Thanks! "Toppers" wrote: Hi, Try: =sum((A1:A10="60-22677")*(B1:B10="IL")*(C1:C10)) and enter as array formula as before HTH "Leona" wrote: Mark -- We've tried and are still not getting a valid response. We've done a test so that we can determine what the valid response should be. Instead of coming up with the numeric value, we're getting a zero. It shouldn't be zero (as in no items counted), so it must be an indicator of a false in the nested if functions somewhere. Any ideas? Thanks "Leona" wrote: Using either AND function, or nested IF functions, I'm trying to sum data in a third column for only those items that meet both of the requirements in the AND function. I can manage to sum the entire column. Any ideas? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Pivot table - show top 20 and group remaining data | Excel Discussion (Misc queries) | |||
Function to autofill remaining width of a cell | Excel Worksheet Functions | |||
I want to get remaining text after using LEFT function | Excel Worksheet Functions | |||
Adding data to celss but keeping the remaining data intact. | Excel Discussion (Misc queries) | |||
data remaining in place | Excel Discussion (Misc queries) |