Excel formula for calculating occurrences per day - excel-formula

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.

Related

Rank based on filtered Date

just trying to overcome that ranking problem and i stuck to find the solution for it.
Basically, i would like to rank on below based on Date filter on Cell C2.
But only want to start the ranking from cell A20 when it matches with the filtered Date.
Also increment identical values on "Prob" column by one
is there any way to do it please?
Use COUNTIFS with a relative reference:
=IF(AND($A6=$C$2,$B6<>""),COUNTIFS($A$6:$A6,$C$2,$B$6:$B6,"="&$B6)+COUNTIFS($A:$A,$C$2,$B:$B,">"&B6),"")

sumif range over mulitple columns

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)

Sum values in different rows if they match

I need some help regarding an issue that I was not able to solve. I tried to figure it out but without reaching my goal. This is what I have:
In sheet 1 I have estimated active customers for a period of time, where columns are months and rows are departments/states:
Sheet 1
Then, in sheet 2, I'm forecasting sales and need excel to return values from sheet 1 depending on which month we are kicking-off for each department:
Sheet 2
Of course, the kick-off month may vary for each department and values from sheet 1 should accommodate according to the selected month on column B in sheet 2.
And within C2:I4 I have used this formula:
=IFERROR(IF(C$1>=$B2,INDEX(Sheet1!$B$2:$F$4,MATCH($A2,Sheet1!$A$2:$A$4,0),MONTH(C$1)-MONTH($B2)+1),""),"")
The formula above actually works great when departments are not repeated in sheet 1 but, what would happen if departments are repeated (as shown in sheet 1) and I have to sum values from the same department and show the result on each cell in sheet 2?
I look forward to your kind help!
Thanks!
Try using SUMIF like this:
=IFERROR(IF(C$1>=$B2,SUMIF(Sheet1!$A$2:$A$4,$A2,INDEX(Sheet1!$B$2:$F$4,0,MONTH(C$1)-MONTH($B2)+1)),""),"")
Please try this formula, designed for your Sheet2!C2 cell.
=IFERROR(SUMIF(INDEX(Rodrigo,,1),$A2,INDEX(Rodrigo,,MONTH(C$1)-MONTH($B2)+1)),"")
In order for this formula to work you should declare a named range comprising of your range Sheet1!A2:F4. My formula calls the range Rodrigo. If you choose another name please change the name in the formula accordingly.
You can exclude zero results by adding a further IF condition to the formula. I would prefer to do that via cell formatting, like 0;0;; where the third semi-colon determines that a zero will not be shown. You can also suppress display of zeros for the entire sheet in the worksheet options.

Return a value relative to every instance of a search term

I have a spread sheet populated with dates (Months) and revenue figures. The sheet is structured with numerous tables all containing these month-revenue pairings but they are not all in the same columns.
I need to be able to search the whole range of cells for a given month and then each time the month is found I need to look across for the revenue figure (5 cells to the right) and return the answer.
The answer returned needs to give the total figure for all instances of the search term.
VLookup won't work because there are multiple tables and they are not all lined up.
Any advice would be very gratefully received.
Thanks
You should use a VBA script for that, IMHO this is not possible to do in a formula. Here is a rough outline what you need to do:
Define an array of the month names as they appear in you sheet
Iterate this array and for each month name find all cells containing it (this might help)
Iterate all cells of each month and do your calculation based on this cell (find a cell with a certain offset or whatever)
If you cen provide a more specific description of your problem (preferably with example data/images), maybe we can give you a more specific answer.

Averaging Highest Three Values of multiple cells in Excel

I have two columns of data. I need the formula to pull the three highest values from both columns and average them.
55,000.00
87,769.12
85,839.97
56,650.00
58,349.50
60,099.99
61,902.98
63,760.07
65,672.88
67,643.06
These values will change and the formula needs to analyze all of the cells constantly to pull the three highest and average. Any help would be appreciated! Thanks!
This formula will do this:
=AVERAGE(LARGE($A:$A,ROW(A1:A3)))
You need to enter it with Ctrl-Shift-Enter.
In your specific example, use this formula:
=AVERAGE(LARGE((C11:D13,M12:N18),ROW(1:3)))

Resources