Suppose, in Cell A1 of Sheet2 I use this formula.
=AVERAGE(Sheet1!A1:A10)
Now when I drag down from A1 to A3
A2 will be =AVERAGE(Sheet1!A2:A11)
A3 will be =AVERAGE(Sheet1!A3:A12)
However I want it in a transpose way. Such as,
A2 will be =AVERAGE(Sheet1!B1:B10)
A3 will be =AVERAGE(Sheet1!C1:C10)
Means, I will use drag down rather than dragging to side, yet I'll get the answer in transpose way, more specifically, I want to change column index rather than changing row index by dragging a formula down.
Is there any way to do that?
Thanks in advance.
One way is to use this formula in Sheet2 A1 and copy down
=AVERAGE(OFFSET(Sheet1!$A$1,,ROW()-1,10))
As you drag it down, ROW()-1 increases by 1 and this is the column offset from A1.
In A1, ROW()-1 returns 0 so there is no offset, but as you go down this increases by 1 and this is the column offset from A1 - so in row 2 this becomes B1 etc.
The 10 indicates the size of the relevant range to be averaged.
In A1 enter:
=AVERAGE(INDEX(Sheet1!$A$1:$Z$10,1,ROW()):INDEX(Sheet1!$A$1:$Z$10,10,ROW()))
and copy downward.
If you need more than 26 items, increase the Z in the formula.
Related
I have to calculate the value of cells A1 till A10 and it takes values from M21, N21, O21, and so on till V21.
How can I write a formula to calculate the same?.
I tried =M$21 to keep row 21 constant, but while dragging the formula down from A1 till A10, it doesn't change the column ref as it's dragging down.
How can I change the column reference to change while dragging the formula down from A1 till A10?.
I would index across the columns based on the current row:
=INDEX($M$21:$V$21,ROW())
use in google sheets:
=INDIRECT(ADDRESS(21, ROW(A13))
dragging this down will give you N21, O21, P21, etc.
Table1 data
i need sumproduct of c1 with c2 , c1 with c3 and so on wile scrolling down the formula like table 2
some thing like this
Paste the below formula to any cell where you would want C1+C2, then drag it down:
=SUM($D$5:$D$12)+SUM(OFFSET($D$4,1,ROW(1:1),8))
What this does is it first sums D5:D12, which is the sum of your C1, then makes use of OFFSET to SUM C2 values in your first cell. Once you drag this down, the ROW(1:1) will move to ROW(2:2), which adjusts the OFFSET to capture the C3 values. This is as well true when you drag it down again for the C4 values.
I have number from 1 to 100 in column A1 to A100.
I am trying to achieve two results from data.
I want separately 1,2,3,4,5,6,7,8,9 and another one 10,20,30,40,50,60,70,80,90,100
Please help me
Maybe, in B1:
=1*(LEN(A1)=1)+2*(RIGHT(A1)="0")
double-click the fill handle and sort A:B on ColumnB.
This question is a bit vague. If you are looking to count by 10s, try adding a 10 in cell B1 and then adding the formula =B1+10 in cell B2. You can drag that formula down to count by 10s.
Let's say we want in column B "0, 1,2,3,4,5,6,7,8,9" and in column C "0, 10,20,30,40,50,60,70,80,90,100", put:
- =MOD(A1,10) as formula for the cell B1
- =INT(A1/10)*10 as formula for the cell C1
and then copy them to rest of the rows.
For example I have cells A1,B1,C1. A1 and B1 are empty and C has a formula = A1+B1. I would like to do is that C1 will add A1 + B1 once B1 is no longer empty.
In reality, there would be D1,E1,F1 ... so forth with formulas as well. I can put the formulas inside a Workbook_change routine, but it would be very buggy if you do a copy and paste. I was wondering if there is another way of doing it?
You don't need VBA. In C1 you can enter this formula:
=IF(AND(LEN(A1)>0,LEN(B1)>0),A1+B1,"")
Hi I have three columns in MS Excell. The columns are A1,B1,C1. C1 is calculated automatically based on formula. The formula defined for C1 is(=A1+B1). I mean C1 is the sum of A1 and B1. Now the problem is I wanted to copy the value of C1 to A1 and want to make the B1 column filled with 0.
The moment i try to copy C1 and paste it into A1 the A1 is displaying as "#href" something like this. so how do i copy the value of C1(without Formula) and then paste it to A1?
When you copy from C1 in A1 Excel is trying to insert in A1 the same formula contained in C1 with your relative addresses adapted to the new position, so the new formula in A1 should sum the two cells at the left of A1, but there are not cells at the left of A1, so the #href error is telling you that.
To do what you want you should paste it like "value". You find that option in the Paste command