Calculate the average of columns, then remove the columns using Google Spreadsheet - excel

I have a data set in a Google Spreadsheet with each column representing a year. The data I want from this spreadsheet is the average over five years, so I create a column for each five year interval containing the average (calculated with =AVERAGE(B2:F2) for the second row and first interval). Now I do not want the columns with specific years when I create a .csv file of the data and use it in my program, but only the columns containing the average. If I remove those columns that I don't want I will get an error saying that elements are missing.
Is there a way, in Google Spreadsheet, to "save" the calculated average (or any function for that matter) in the column so that it only contains a single numeric value and has no dependencies?

If i'm understanding your question correctly, you could highlight all the cells with the averages, copy and paste special - values. that would remove all the formulas you have in those cells but would keep the values when you delete the data columns.

Related

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'.

How to cross reference between data columns and then filter by number of months after a specified date?

I am working with two spreadsheets. Spreadsheet “A” contains data with dates, and an ID number. Spreadsheet “B” contains data with dates and an ID number.
I want to cross reference spreadsheet “A” ID number with spreadsheet “B” ID number. If the ID number in “A” appears in “B”, I want to use that entry and filter by its appearance 12 and 24 months after that date.
I know this reads as very confusing. I am having a difficult time figuring out the best way to do this. I’m working a dataset that has ten of thousands of rows and another spreadsheet with million plus rows.
I have tried to use this formula =IF(ISERROR(MATCH(Y2,$AA$2:$AA$12316,0)),"No","Yes") to filter out if a data is in an array in a column next to it. I pasted data from spreadsheet "b" into spreadsheet "a".
I am now stuck because I need to have another layer of analysis by the number of months after the date.
Any help if appreciated. Thanks for reading.

To match time stamp in excel

In spreadsheet A, I have hourly data corresponding to a particular set of sample numbers (e.g. 1-10). Then I have 7 other data spreadsheets with 7 different time stamps (mm/dd/yyy hh:mm:ss) format. Out of 7, six spreadsheets have data every 2 minutes and the seventh has data every hour.
My objective is to match corresponding data values of 7 spreadsheets (1-7) with spreadsheet A and calculate the mean value of the data for each set of samples.
I have only basic knowledge of working with excel, so I first created a grand time stamp (called it as GTS, which has data entries every second) and then converted each entry of GTS and other time stamp entries into "serial date" format. I am trying to match these entries using functions like "IF", "Match" etc. but haven't found an appropriate method to execute it correctly.
Any advice would be appreciated. Thanks!
ok, i'm not exactly sure what you're trying to say but this is what i imagine,
Sheet 1 is your summary sheet, with column A having the times and data to the right. and sheets 2-7 with the source data in a similar set up.
1st question do you need all the data in 1 column or can you have 7 columns with the last one being the mean? if so then
=index(Sheet2!B:B,match(A2,Sheet2!A:A,0),0)
and sheet3 or whatever he sheet name is for the next column
or you can get creative and have the sheet names in the summary sheet as column headings then you can just do
=index(Indirect("B:$1"&"!B:B"),match(A2,Indirect("B:$1"&"!A:A"),0),0)
Also if the data isn't available for every time stamp then i'd add this around the formula to return 0s
=Iferror(......,0)
if you need to do all 6 source sheets in 1 cell then you gotta do some nesting

Countif with dynamic headers

Good afternoon! I'm trying to get a Countifs or Index Match statement to count the number of times a value occurs in another table. The example:
On my report sheet, Column A contains 10 different statuses, such as Green, Yellow, Red etc.; Row 1 contains six dates, such as 1/31/2015, 2/28/2015, etc. These dates are calculations. The last date references my date worksheet and the five other use EOMONTH to get the month end for the five prior months.
On my data table, I have 7 descriptive columns (such as Type, Make, Model, etc) and then we begin date columns: 1/31/2010 all the way to 7/31/2015. I add a new column each month (I know, I don't like it either, but unfortunately we don't have a time series database).
What I need to do is have a Countifs or Index Match that pulls the date from my report tab, goes and finds it in the header row of my tblTrends, and then counts all those statuses that are Green, and if it's a SUV (for example).
Thoughts?
Thx!!
G
At it's most basic, you'd want something akin to:
=COUNTIFS(TypeRange,"SUV",FirstMonth,Status)
So let's say your data table starts in column L, and the first date column is O:
=COUNTIFS($L$1:$L$100,"SUV",O$1:O$100,A$2)
As you drag this formula across the different dates, it will move the date reference over one to the next month.
If you need it to dynamically determine the date column, I'd recommend OFFSET, which dynamically select a range. However, note that OFFSET is a "volatile" formula, which means it re-calculates anytime a change is made anywhere in the file, which can lead to pretty slow load times if not used sparingly.
=COUNTIFS($L$2:$L$100,"SUV",OFFSET($N$2:$N$100,,MATCH(B$1,$O$1:$Z$1,0)),$A2)
The OFFSET starts on column N, because that's the first column before the columns we want (the date columns). The MATCH tells it how many columns to OFFSET from here.
If you're going to use this over a large amount of data, then you could avoid using the OFFSET formula by creating a dynamic table. This table would only contain data for the six months you're interested in, by utilizing INDEX/MATCH, and you could run your COUNTIFS off this table, instead, using the original, basic method I first described. I can go into detail if you're unsure what I mean.

Summation of entries with the same date in Excel

I have two columns with data (several thousand rows), one with dates and one with duration (time in hh:ss). However, there's multiple records for each day. Is there any way to add these together based on the date and get one entry per day with the summed value?
Below is a picture showing a subset of my Spreadsheet:
I think what could be very useful to you would be the Consolidate function.
If you click on the Data tab on the menu bar, on the mid-right side is a button called consolidate.
Steps to Success:
Select a range beside your existing values, if you photo is the same I would suggest highlighting all of columns C, and D.
With the columns highlighted press the Consolidate button.
Within consolidate choose Sum for the function, and highlight the data in columns A, and B for the reference.
Make sure to check off Left column in Use Labels In
With dates properly formatted as dates, and times properly formatted as times this should sum all of the times given for a particular date. Test trials were successful.
Let me know if that works for you, commetn if you have any questions.

Resources