Calculation of two cells in a COUNTIF - excel

I have an Excel document with two date columns and a column with four possible values. I need to filter for one value on the last column. Then I need to calculate the days between the two dates for all the values that are left and count the times that those days are between 0 and 30.
I know how to filter and I know how to calculate the days between two dates. I also know how to count the times those days are between 0 and 30.
I cannot figure out how to put it all together without making a simple calculation in another sheet and hide it.

No longer needed. I found out how to pull the data from Google Analytics with some VBA code.

Related

What formula can I use to search a value and add cells two rows over across multiple sheets?

I am trying to add values across sheets and an having a hard time finding a good formula to do this with.
I have over 300 sheets, representing rooms, that have two relevant columns, one that has dates and another with water consumption usage that look like this:
enter image description here
Issue is, the dates are inconsistent across all of the sheets. The full range of dates should be from 1/13/2023 to 2/6/2023 but many sheets are missing dates because water consumption wasn't read that date.
I have a summary page with a column representing the full range of dates and another column where I want to add usage for the specific date across all the sheets to show how much water was consumed that day across all rooms. Since the dates and usage are all in different cells, I can't call out specific cells. What is the best formula to use and how can I format it correctly?
I tried SUMIF formula's as well as IF formulas and tried nesting variations of them, but ultimately I am having trouble finding a formula/formatting that allows me to call out a cell value (ex, 2/6/2023) and sum the value two columns over. I am fairly new to the more advanced formula's so please forgive my ignorance.

How can I average one row of every two columns in Excel?

Hi, I have a large dataset where I need to calculate a lot of averages. I have a large table, where every row represents a different timepoint, and every two adjacent columns are a replicate of that timepoint, which I want to calculate the average of and return it in a new table below. Basically, I want to calculate the average of the same row of two columns (i.e. C55 and D55), and put the averages in C92, then move on to the next set of two columns (i.e. E55 to and F55), put the averages in D92 and so on.
I have tried using the Offset formula, but I can't figure it out. Could someone provide me with the correct formula to plug in?
Thanks!!!
If you have Excel 365 you could use this formula in C92 to retrieve the averages for row 55:
=TOROW(BYROW(WRAPROWS(C55:H55,2),LAMBDA(r,AVERAGE(r))))
WRAPWROWS wraps the row into single rows per two columns - then it is easy to calculate the average 'BYROW'.

excel sumproduct formula calculating time

hello dear forum members and admins,
i created a dashboard to calculate customer numbers based on raw data prepared on day and time set.
there is no problem here I can calculate. but I also want to calculate the monthly average customer numbers based on the time set. for this purpose, I created a data table in a daily_pax_sheet. for e.g in January between 10:00 - 10:30 CUSTOMERS E totally number is 35 and this 35 amount occurred in 8 days, then it calculates 4 amounts. in daily_pax_details sheet row 107 formula firstly calculate sum of the data then it divides the day number (for e.g this amount occurs in 8 days) but in some cases, raw data include more than 20k line and it's calculating and waiting too much. is there any other way to do it in a quick way ? how can I change this formula to make calculation quick ?
https://docs.google.com/spreadsheets/d/1y-2Ke2ssskzSM-wYszU54CIEraPbEX4X/edit#gid=459027650
UPDATE: thanks for the idea and solution from members
I also realized another solution and I think it will help other people in the future. we can get the data to the pivot table with counting the unique values with changing field settings. To do it you should get the data pivot table with selecting "add this data to the data model". then changing value field settings with the "Distinct value". hope it will help another pppl.
Your SUMIFS formulas use whole columns as criteria, so every calculation checks more than 1 million cells. And because you use more than 1 column, then every time you update *anything in the file, Excel checks more than 4 million cells because of your formulas...
I changed all to use the righ rawdata range of cells used, not whole columns. And now it works perfect.
As example, your formula is:
=SUMIFS('raw data'!$R:$R;'raw data'!$D:$D;'Daily customer'!C$3;'raw data'!$I:$I;'Daily customer'!$A4)
And I changed to:
=SUMIFS('raw data'!$R$2:$R$2461;'raw data'!$D$2:$D$2461;'Daily customer'!C$3;'raw data'!$I$2:$I$2461;'Daily customer'!$A4)
Because in your sheet raw data your data goes from row 2 to 2461, so in every calculation Excel checks only 2460 cells, not 1 million....
Change all your formulas like this and you should notice a better performance indeed.
UPDATE: I've uploaded the modified file: https://docs.google.com/spreadsheets/d/11isonBHFJTFFWtZTJg66JHbtyrD0XFGl/edit?usp=sharing&ouid=114417674018837700466&rtpof=true&sd=true
It works smoothly for me. No lag or anything. I can change any cell value, move the graph, filter cells and everything is done almost instantly.

SUMIFS with Date Range...but X days before and X days after

I am trying to create a SUMIFS function that is adding totals based on several parameters. The final parameter is to use a date in a column and then look for any dates 7 days prior and 7 days after.
I have a list of invoices I am trying to sum up based on travel...conceivably people who are traveling will travel in a short duration. I cant add all invoices up because someone might travel at the beginning of the month and at the end, creating 2 trips.
Lets say the date is in Column I and my criteria cell is I10, I tried to enter the Criteria Range as "(I10-7)=>I10<=(I10+7)"
But this is clearly wrong. Any help is appreciated!
Try,
=sumifs(A:A, I:I, ">="&I10-7, I:I, "<="&I10+7)
Add your other criteria pairs making sure that the criteria ranges are the same number of rows as the sum range.

excel 2010 Count IF value and date meet condition

Hi look at some topics here could not find one that meets what I need to do.
I have a SharePoint list which I open in Excel(2010) in SharePoint I have created a calculated field that counts how days have passed between to dates. in excel these columns are "M" and "N". My calculated column in excel is "T"
This made the calculation in excel simple.
which calculate how many days have passed that is less than 6 (days).
=COUNTIF(Data!$T:$T,"<"& 6)
This give me overall calculation for 12 months. What I need to do is break it down per months.
for example: how many days pass that is less than 6 in Nov. my date column "M" so I tried
=COUNTIF(Data!$T:$T,"<"&6&"AND"& TEXT(Data!$M:$M,"mmm") = "Nov")
This give me a count of zero which I know is not correct. so I was wondering what the best way to add the second columns criteria ?
Try this
=SUMPRODUCT((TEXT(Data!$M:$M,"mmm")="Nov")*(Data!$T:$T<6))
As you have Excel 2010, you can use the more powerful COUNTIFS
=COUNTIFS(Data!$T:$T,"<6",Data!$M:$M,">="&DATE(2013,11,1),Data!$M:$M,"<"&DATE(2013,12,1))
The DATE calculation can also reference cells, so you could change the count to this: (split into lines for readability)
=COUNTIFS(Data!$T:$T,"<6",
Data!$M:$M,">="&DATE(2013,MonthCell,1),
Data!$M:$M,"<"&DATE(2013,MonthCell+1,1))

Resources