Sumifs criteria to look for the value in two columns - excel

hi i am using sumifs function "=SUMIFS('AT&TT'!$F:$F,'AT&TT'!$C:$C,AT!$C$3,'AT&TT'!$E:$E,AT!$E$3,'AT&TT'!$H:$H,AT!G2)"
which is working fine, but additionally what I require is in first criteria of the formula
"=SUMIFS('AT&TT'!$F:$F,'AT&TT'!$C:$C,AT!$C$3,'AT&TT'!$E:$E,AT!$E$3,'AT&TT'!$H:$H,AT!G2)"
instead of column range AT&TT'!$C:$C I need AT&TT'!$C:$D, i want to look for the value in either of the columns.
I tried using vlookup as criteria inside sumifs.

So what about the simple method:
=SUMIFS('AT&TT'!$F:$F,'AT&TT'!$C:$C,AT!$C$3,'AT&TT'!$E:$E,AT!$E$3,'AT&TT'!$H:$H,AT!G2)+"=SUMIFS('AT&TT'!$F:$F,'AT&TT'!$D:$D,AT!$C$3,'AT&TT'!$E:$E,AT!$E$3,'AT&TT'!$H:$H,AT!G2)"
Where you do 1 sumifs for Range C and another for Range D .

Related

How to get multiple values in row wise in Excel

Below is my Workbook Sheet1
Am expecting sheet2 like below,
Total Item column (Using countifs I can get but Sub_Item1,2 and 3 How do I use Match Index in Excel)
Use countifs to count total_item =COUNTIFS($A$3:$A$12,D3). For sub items use below formula. Then drag down and right as needed. If need to handle errors then use IFERROR() function.
=INDEX($B$3:$B$12,AGGREGATE(15,6,(ROW($A$3:$A$12)-ROW($A$2))/($A$3:$A$12=$D3),COLUMN(A$1)))

excel vba select range between two numbers

C column is sorted from the input data
From the sorted output, the selected range should be with in -0.25 to +0.25
How to add more than one criteria in COUNTIF function or its similar function?
Original syntax:
.Resize(Application.CountIf(.Cells, "<0")).Select
Requirement:
.Resize(Application.CountIf(.Cells, ">-0.25 & <0.25")).Select
Replace CountIf with CountIfs when you want more than one condition. Try this:
.Resize(Application.WorksheetFunction.CountIfs(.Cells, ">-0.25", .Cells, "<0.25")).Select

How to simplify adding multiple countifs formula in excel

I want to count the number of cells that meet two conditions:
sheet ABC's A2:A100 should be equal to the value of sheet XYC cell A8
the cell value in range D2:M100 = 1
Originally, I tried to use this formula:
=COUNTIFS(ABC!$A$2:$A$100,XYC!A8,ABC!$D$2:$M$100,1)
But this gave me error #VALUE
I then decided to use the following formula to count each column separately and add them together.
=COUNTIFS(ABC!$A$2:$A$100,XYC!A8,ABC!$D$2:$D$100,1)+
COUNTIFS(ABC!$A$2:$A$100,XYC!A8,ABC!$E$2:$E$100,1)+
COUNTIFS(ABC!$A$2:$A$100,XYC!A8,ABC!$F$2:$F$100,1)+
COUNTIFS(ABC!$A$2:$A$100,XYC!A8,ABC!$G$2:$G$100,1)+
COUNTIFS(ABC!$A$2:$A$100,XYC!A8,ABC!$H$2:$H$100,1)+
COUNTIFS(ABC!$A$2:$A$100,XYC!A8,ABC!$I$2:$I$100,1)+
COUNTIFS(ABC!$A$2:$A$100,XYC!A8,ABC!$J$2:$J$100,1)+
COUNTIFS(ABC!$A$2:$A$100,XYC!A8,ABC!$K$2:$K$100,1)+
COUNTIFS(ABC!$A$2:$A$100,XYC!A8,ABC!$L$2:$L$100,1)+
COUNTIFS(ABC!$A$2:$A$100,XYC!A8,ABC!$M$2:$M$100,1)
I am wondering if there are any other ways that allows me to shorten my formula?
Thank you.
You can use a boolean structure inside SUMPRODUCT() or just SUM() if your version of Excel supports dynamic arrays (ms365):
=SUMPRODUCT((ABC!A2:A100=XYC!A8)*(ABC!D2:M100=1))

SUMIFS Is Blank OR Other Condition

I am trying to sum the values in the B2:B4 range using the SUMIFS function if the dates in the C2:C4 range are either blank or after the date in cell C1.
I can add the values in B if cells in C2:C4 are either blank or if the dates are after C1, in separate formulae, but I cannot seem to combine those conditions into one formula with an OR condition.
=SUMIFS(B2:B4,C2:C4,"") + SUMIFS(B2:B4,C2:C4,">"&C1)
The formula that I am working on is actually much longer and complicated so I want to combine these conditions into one formula or condition inside a SUMIFS if possible.
I have looked for hours but cannot seem to find what I am looking for. Solutions I have found thus far test for blank and a text value or if greater than 0, but not a comparison of non-text non-zero values such as dates. Does anyone know of the solution?
I think we can not put the "or" condition in one criteria range with cell reference.
You can use the SUMIFS formula but you have to hard code the criteria value of date.
Pass the "or" conditions in { },this will return the value for both "or" conditions than use SUM function to get the total value.
SUM(SUMIFS(B2:B4,C2:C4,{">15-05-2021",""}))
Use of SUMPRODUCT function will be a better option in given condition
SUMPRODUCT(--(C2:C4>C1)+(C2:C4=""),B2:B4)

Sumif partial data in a column meets a criteria

I am trying to get a sum of G3:G47 if A54 matches the first 3 characters in the cell range A3:A47
This is the formula I have been trying to tinker with, but it doesn't work.
=SUMIF(A$3:A$47,LEFT(A$3:A$47,3)=[#[Sprint ID]],C$3:C$47)
Use WildCards:
=SUMIF(A$3:A$47,[#[Sprint ID]] & "*",C$3:C$47)

Resources