sumif range over mulitple columns - excel

I have the below table in excel
And I want to add a overall line total in for all w/c columns that have a invoice number in the column next to it.
For example I have used =sumif(B2,">0",A2) to bring back the total for w/c 1st but how can i add all values together across the multiple columns - essentially trying to do a sumif multiple range (if that is possible) to get the same result as the below example:
Any help or alternative method to achieve this much appreciated.

You could try:
Formula in I2:
=SUMPRODUCT((ISODD(COLUMN(A2:G2)))*(B2:H2<>"")*A2:G2)

Related

Sum multiple rows using columns as criteria

I'm trying to sum multiple rows using column headers as criteria but keep coming up blank.
In this table, the range that needs to be summed is D2:F4 but ultimately I'll be summing arbitrary, contiguous date ranges.
All help greatly appreciated. Thanks!
(Sorry no rep yet to post pics)
To return data from the current week (based on Rory's solution):
=SUMPRODUCT((B1:1>=(TODAY()-WEEKDAY(TODAY(),2)+1))*(B1:1<=(TODAY()-WEEKDAY(TODAY(),2)+5))*(B2:4))
You can use SUMPRODUCT for this - eg:
=SUMPRODUCT((B1:Z1>=DATE(2021,9,1))*(B1:Z1<=DATE(2021,9,30))*(B2:Z4))
to sum data for September of this year.

How to get the rows which has a value greater than a number across all columns in excel sheet?

I am newbie to the excel formulas.I have an excel sheet which has lets say 100 rows and 100 columns. columns have different values from 0 to 20. I want the rows where any of the column value is greater than 10.
How to ignore the hidden columns, if these are in the range, without modifying the range? I mean based on some IsHidden kind of property?
Something simple like:
Formula used in F1:
=IF(COUNTIF(A1:E1,">10")>0,TRUE,FALSE)
If you have data in 100 columns from A to CV, put this at the top of an empty column (CW1) and fill down:
=MAX(A1:CV1)>10
You could try:
=IF(MAX(A1:C1)>10,"Greater",IF(MAX(A1:C1)=10,"Equal",IF(MAX(A1:C1)<10,"Smaller")))
Image:
New Version as per request:
=IF(MAX(A1:B1,E1:F1)>10,"Greater",IF(MAX(A1:B1,E1:F1)=10,"Equal",IF(MAX(A1:B1,E1:F1)<10,"Smaller")))
You can't automatically ignore hidden columns in formulas, but you can automatically ignore hidden rows. If you transpose your data, using Copy > Paste Special, you can use this formula to test the maximum value ignoring hidden rows:
=AGGREGATE(4,5,A1:A100)>10
To understand the first two parameters, you can look at the help on the AGGREGATE function, or you can type out the function manually to get pop-ups lists that explain the options.

Excel formula for calculating occurrences per day

I'm trying to calculate the number of occurrences per day for several columns of data.
Here's an example of my data set:
Data set
Here's how I need to present it:
Present data
Any help is greatly appreciated!
In the Cell W3 of Sheet 2, use the COUNTIFS formula to achieve the desired result. You might need to change the sheet name in the below example or column names.
=COUNTIFS('Sheet1'!$B:$B,'Sheet2'!$A3,'Sheet1'!$A:$A,'Sheet2'!W$2)
and just drag this formula to the right and down and you'll get the desired results.

SUMIF - range and value on different rows

I'm trying to write a SUMIF formula based on checking to see if a specific value is present on the row above but spread across different rows as in the image below.
Any help appreciated
You need to use something like =sumif(B3:F3,H2,B4:F4)
=sumif(range of group1 headings,cell to the left of total hours,range of group1 numbers)
your question is not too clear but you may be trying to sum all the groups together at once which you can't do with a single sumif but you can add 3 sumif funtions together in the same formula.
=sumif(B3:F3,H2,B4:F4)+sumif(B6:F6,H2,B6:F6)+sumif(B9:F9,H2,B9:F9)

How do you sum an array of formulas within one Google Sheets cell?

If you have a basic table of values with participants sharing each itemized expense. The cells of the table represent their share of the amount, how do you sum all the per-item totals in one row at the bottom of the table?
I've tried using SUM(ARRAYFORMULA(B2:B5*C2:C5)), which gets close, but I need the divisor to be divided by the count all involved columns. Every time I try mapping the amount over the count of each row, it attempts to count all rows and columns together.
I have a working example on Google Sheets
Use SUMPRODUCT:
=SUMPRODUCT($B$2:$B$5*IFERROR(C2:C5/($C$2:$C$5+$D$2:$D$5+$E$2:$E$5),0))
You can also do it by developing the row totals of the 2d range C2:E5 and calculating the share for each person from there
=SUM($B$2:$B$5*N(+C$2:C$5)/(MMULT(N(+$C$2:$E$5),TRANSPOSE(COLUMN($C$2:$E$5)^0))))
It is an array formula and must be entered with CtrlShiftEnter or in Google Sheets as
=arrayformula(SUM($B$2:$B$5*N(+C$2:C$5)/(MMULT(N(+$C$2:$E$5),TRANSPOSE(COLUMN($C$2:$E$5)^0)))))
Another way of doing it in Excel is using OFFSET and SUBTOTAL, but it doesn't work in Google Sheets
=SUM($B$2:$B$5*N(+C$2:C$5)/SUBTOTAL(9,OFFSET($C$2,ROW(C$2:C$5)-ROW($C$2),0,1,COLUMNS($C$2:$E$5))))

Resources