Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I am trying to find a short cut for the if funtion. Here is my formula (it
takes so long to input and then when I want to copy it to a new set of values, it takes a long time to revise. Here is my recent formula for on one of the values that I need. =IF(C5=1,SUM(D5),0)+IF(C6=1,SUM(D6),0)+IF(C7=1,SUM (D7),0)+IF(C21=1,SUM(D21),0)+IF(C22=1,SUM(D22),0)+ IF(C23=1,SUM(D23),0)+IF(C24=1,SUM(D24),0)+IF(C25=1 ,SUM(D25),0)+IF(C35=1,SUM(D35),0)+IF(C36=1,SUM(D36 ),0)+IF(C37=1,SUM(D37),0)+IF(C38=1,SUM(D38),0)+IF( C39=1,SUM(D39),0)+IF(C40=1,SUM(D40),0)+IF(C41=1,SU M(D41),0)+IF(C42=1,SUM(D42),0)+IF(C43=1,SUM(D43),0 )+IF(C44=1,SUM(D44),0)+IF(C45=1,SUM(D45),0)+IF(C46 =1,SUM(D46),0)+IF(C47=1,SUM(D47),0) This is what I tried to do, =IF(C5:C47=1,SUM(D5:D47),0) but it does not like the (C5:C47) -- Sheri |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
First, your SUM()s are superfluous: SUM(D5) is equivalent to D5.
Try: =SUMIF(C5:C47,1,D5:D47) In article , "Sheri" wrote: I am trying to find a short cut for the if funtion. Here is my formula (it takes so long to input and then when I want to copy it to a new set of values, it takes a long time to revise. Here is my recent formula for on one of the values that I need. =IF(C5=1,SUM(D5),0)+IF(C6=1,SUM(D6),0)+IF(C7=1,SUM (D7),0)+IF(C21=1,SUM(D21),0) +IF(C22=1,SUM(D22),0)+IF(C23=1,SUM(D23),0)+IF(C24= 1,SUM(D24),0)+IF(C25=1,SUM(D 25),0)+IF(C35=1,SUM(D35),0)+IF(C36=1,SUM(D36),0)+I F(C37=1,SUM(D37),0)+IF(C38=1 ,SUM(D38),0)+IF(C39=1,SUM(D39),0)+IF(C40=1,SUM(D40 ),0)+IF(C41=1,SUM(D41),0)+IF (C42=1,SUM(D42),0)+IF(C43=1,SUM(D43),0)+IF(C44=1,S UM(D44),0)+IF(C45=1,SUM(D45) ,0)+IF(C46=1,SUM(D46),0)+IF(C47=1,SUM(D47),0) This is what I tried to do, =IF(C5:C47=1,SUM(D5:D47),0) but it does not like the (C5:C47) |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Sheri,
=SUMPRODUCT(C5:C47,D5:D47) may work, depending on what you have besides 1s in cells C5:C47 - 0 or blank is okay, other numbers are bad for this. =SUM(IF(C5:C47=1,D5:D47)) Entered using Ctrl-Shift-Enter will definitely work. HTH, Bernie MS Excel MVP "Sheri" wrote in message ... I am trying to find a short cut for the if funtion. Here is my formula (it takes so long to input and then when I want to copy it to a new set of values, it takes a long time to revise. Here is my recent formula for on one of the values that I need. =IF(C5=1,SUM(D5),0)+IF(C6=1,SUM(D6),0)+IF(C7=1,SUM (D7),0)+IF(C21=1,SUM(D21),0)+IF(C22=1,SUM(D22),0)+ IF(C23=1,SUM(D23),0)+IF(C24=1,SUM(D24),0)+IF(C25=1 ,SUM(D25),0)+IF(C35=1,SUM(D35),0)+IF(C36=1,SUM(D36 ),0)+IF(C37=1,SUM(D37),0)+IF(C38=1,SUM(D38),0)+IF( C39=1,SUM(D39),0)+IF(C40=1,SUM(D40),0)+IF(C41=1,SU M(D41),0)+IF(C42=1,SUM(D42),0)+IF(C43=1,SUM(D43),0 )+IF(C44=1,SUM(D44),0)+IF(C45=1,SUM(D45),0)+IF(C46 =1,SUM(D46),0)+IF(C47=1,SUM(D47),0) This is what I tried to do, =IF(C5:C47=1,SUM(D5:D47),0) but it does not like the (C5:C47) -- Sheri |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Looks like you need the the SUMIF() function:
=sumif(C5:C47,1,D5:D47) "Sheri" wrote: I am trying to find a short cut for the if funtion. Here is my formula (it takes so long to input and then when I want to copy it to a new set of values, it takes a long time to revise. Here is my recent formula for on one of the values that I need. =IF(C5=1,SUM(D5),0)+IF(C6=1,SUM(D6),0)+IF(C7=1,SUM (D7),0)+IF(C21=1,SUM(D21),0)+IF(C22=1,SUM(D22),0)+ IF(C23=1,SUM(D23),0)+IF(C24=1,SUM(D24),0)+IF(C25=1 ,SUM(D25),0)+IF(C35=1,SUM(D35),0)+IF(C36=1,SUM(D36 ),0)+IF(C37=1,SUM(D37),0)+IF(C38=1,SUM(D38),0)+IF( C39=1,SUM(D39),0)+IF(C40=1,SUM(D40),0)+IF(C41=1,SU M(D41),0)+IF(C42=1,SUM(D42),0)+IF(C43=1,SUM(D43),0 )+IF(C44=1,SUM(D44),0)+IF(C45=1,SUM(D45),0)+IF(C46 =1,SUM(D46),0)+IF(C47=1,SUM(D47),0) This is what I tried to do, =IF(C5:C47=1,SUM(D5:D47),0) but it does not like the (C5:C47) -- Sheri |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
"Sheri" wrote in message
... I am trying to find a short cut for the if funtion. Here is my formula (it takes so long to input and then when I want to copy it to a new set of values, it takes a long time to revise. Here is my recent formula for on one of the values that I need. =IF(C5=1,SUM(D5),0)+IF(C6=1,SUM(D6),0)+IF(C7=1,SUM (D7),0)+IF(C21=1,SUM(D21),0)+IF(C22=1,SUM(D22),0)+ IF(C23=1,SUM(D23),0)+IF(C24=1,SUM(D24),0)+IF(C25=1 ,SUM(D25),0)+IF(C35=1,SUM(D35),0)+IF(C36=1,SUM(D36 ),0)+IF(C37=1,SUM(D37),0)+IF(C38=1,SUM(D38),0)+IF( C39=1,SUM(D39),0)+IF(C40=1,SUM(D40),0)+IF(C41=1,SU M(D41),0)+IF(C42=1,SUM(D42),0)+IF(C43=1,SUM(D43),0 )+IF(C44=1,SUM(D44),0)+IF(C45=1,SUM(D45),0)+IF(C46 =1,SUM(D46),0)+IF(C47=1,SUM(D47),0) This is what I tried to do, =IF(C5:C47=1,SUM(D5:D47),0) but it does not like the (C5:C47) -- Sheri =SUMPRODUCT((C5:C47=1)*(D5:D57)) Ciao Bruno |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Maybe..........
=SUMIF(C5:C7,1,D5:D7)+SUMIF(C21:C25,1,D21:D25)+SUM IF(C35:C47,1,D35:D47) Vaya con Dios, Chuck, CABGx3 "Sheri" wrote: I am trying to find a short cut for the if funtion. Here is my formula (it takes so long to input and then when I want to copy it to a new set of values, it takes a long time to revise. Here is my recent formula for on one of the values that I need. =IF(C5=1,SUM(D5),0)+IF(C6=1,SUM(D6),0)+IF(C7=1,SUM (D7),0)+IF(C21=1,SUM(D21),0)+IF(C22=1,SUM(D22),0)+ IF(C23=1,SUM(D23),0)+IF(C24=1,SUM(D24),0)+IF(C25=1 ,SUM(D25),0)+IF(C35=1,SUM(D35),0)+IF(C36=1,SUM(D36 ),0)+IF(C37=1,SUM(D37),0)+IF(C38=1,SUM(D38),0)+IF( C39=1,SUM(D39),0)+IF(C40=1,SUM(D40),0)+IF(C41=1,SU M(D41),0)+IF(C42=1,SUM(D42),0)+IF(C43=1,SUM(D43),0 )+IF(C44=1,SUM(D44),0)+IF(C45=1,SUM(D45),0)+IF(C46 =1,SUM(D46),0)+IF(C47=1,SUM(D47),0) This is what I tried to do, =IF(C5:C47=1,SUM(D5:D47),0) but it does not like the (C5:C47) -- Sheri |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Hide formula | Excel Worksheet Functions | |||
Formula checking multiple worksheets | Excel Worksheet Functions | |||
IF & VLOOKUP FORMULA | Excel Worksheet Functions | |||
Match / Vlookup within an Array formula | Excel Discussion (Misc queries) | |||
Help with macro formula and variable | Excel Worksheet Functions |