Formular dragging in Excel - excel

I have a data of 1000 rows in Excel, and I wish to calculate the variance of every 10 data, say =var.s(A1:A10), =var.s(A11:A20), .....
I did the first two manually and tried to drag the formulas down, but instead of having =var.s(A21:A30), =var.s(A31:A40) I had =var.s(A3:A12), =var.s(A13:A22).
Could anyone please suggest how I can get my desired results?

If your values are in ColA you can use a formula like the one shown below: for each row you drag it down it will offset the range fed to VAR.S by 10 rows.

Related

How to apply a excel formula to millions of rows

I have a formula that basically compares between each columns of two different sheets and outputs the different on another sheet
Something like :
=IF(Jan!A1<>Feb!A1,"JanSales: "&Jan!A1&char(10)&"FebSales: "&Feb!A1,"")
Basically this gives the exact differences between the Jan and Feb data which I can drag the formula cell to give me results for the desired number of rows. However the problem is I have nearly 0.5 million rows in the sheet. Is there a better way other than dragging the cursor till 0.5 Million rows
Thanks

Dynamic Validation but with Columns

I am trying to do a dynamic data validation list using row 5 and adding columns as data is added to those columns. So I have googled and found lot's of offset formulas that are designed to offset on rows but my data is in columns (D5, E5, F5, G5, H5, etc ....).
I tried adapting this formula but it doesn't give me what I want:
=OFFSET('Borrower Database'!$D$5,0,0,COUNTA('Borrower Database'!$5:$5),1)
I want my list to read from the columns on row 5 and dynamically grow as I add more names to the next columns.
Can anyone tweak this formula for me?
You are almost there :) Look at OFFSET function definition. In your formula [height] is swapped with [width]. Corrected formula:
=OFFSET('Borrower Database'!$D$5,0,0,1,COUNTA('Borrower Database'!$5:$5))

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.

Need light formula to get some counts in large data sheet

I have an employee data base that contains names and 8 movement types (Ex. Recruitment, Resignation....etc). Also I have starting head counts.
What I need to do is calculating movement counts and head counts based on the month for 12 months. Currently i am using SUMIF formula to calculate all these and the thing is excel will be very slow with all formulas. Appreciate if anyone can help me on this. See the image below for sample of the formula and I need to insert this formula in more than 600 lines.
A pivot table would be a good way to go, but by the look of your criteria you'll need to create 'helper columns' to ensure your data is ready for aggregation in a Pivot table.
For instance in your master data tab, add a new column called 'MatchesCriteria' or words to that effect, and build a formula in that column that checks for all of the criteria that you want to have the report based on, and returns a 1 or a 0, e.g.
=IF( (IF(C2="Recruitment",1,0)+IF(D2="Secondment In",1,0)) > 0 , 1 , 0)
Then run a pivot table including the 'Plant' column in your Rows, the month column in your columns and the 'MatchesCriteria' in your data values, and switch the calculation type to 'SUM' rather than 'COUNT'.
This will do the trick and will refresh in a flash compared to evaluating all of those countif statements.

Transpose multiple rows into columns

I've came across this task and I'm stuck big time. I've tried a PivotTable but it didn't give me the desired result. The only thing that works is a manual transpose but the number of records is 5k odd.
What I'm trying to achieve here is to transpose the data from rows for the company into columns so at a later stage to be able to count the number of votes and average per company.
PivotTable can do the job. All you need is a helper column using COUNTIFS. Notice the formula in cell D2.
And the PivotTable would look like this (set to Tabular Layout)
A note to take here is COUNTIFS can get really slow when the number of records grow to around 10k or more (or just my slow pc :/). When this happens, the workaround is: first sort your data, then use COUNTIFS over a limited number of cells only. For example, at cell D2, the formula will be =COUNTIFS(A2:A102,A2,B2:B102,B2), hence counting only 100 records rather than the whole bunch as you fill down the formula.
If what you want is the number of votes and average per company, that can be done in a variety of ways.
Using a Pivot Table, drag companies to the rows area; drag rating to the values area twice. Then change the Value Field setting on one of the Ratings to Count; and on the other to Average.
Add some formatting and various options gives you:
Or if you have a list of the Organizations (Company Names) in, let us say, G3:Gn, and your data table in columns A:C, you can use formulas:
Count: H3: =COUNTIF($B$1:$B$1000,G3)
Average: I3: =AVERAGEIF($B$1:$B$1000,G3,C1:$C$1000)
And fill down as far as needed.
Since you mentioned a PT did not suit , assuming RATING is in F2, please try in G3 copied down to suit:
=IF(AND(COLUMN()-7<COUNTIF($E:$E,$E3),$E2<>$E3),OFFSET($F3,COLUMN()-7,0),"")
then drag all the formulae to the right until an entire column appears blank. Note this requires the TARGET ATTENDEE ORGANIZATION column be sorted.

Resources